claudia-orchestrator 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +109 -0
- package/dist/cli-parser.d.ts +11 -0
- package/dist/cli-parser.d.ts.map +1 -0
- package/dist/cli-parser.js +57 -0
- package/dist/cli-parser.js.map +1 -0
- package/dist/cui-server.d.ts +69 -0
- package/dist/cui-server.d.ts.map +1 -0
- package/dist/cui-server.js +705 -0
- package/dist/cui-server.js.map +1 -0
- package/dist/mcp-server/claudia-tools.d.ts +15 -0
- package/dist/mcp-server/claudia-tools.d.ts.map +1 -0
- package/dist/mcp-server/claudia-tools.js +366 -0
- package/dist/mcp-server/claudia-tools.js.map +1 -0
- package/dist/mcp-server/index.d.ts +3 -0
- package/dist/mcp-server/index.d.ts.map +1 -0
- package/dist/mcp-server/index.js +176 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/dist/middleware/auth.d.ts +18 -0
- package/dist/middleware/auth.d.ts.map +1 -0
- package/dist/middleware/auth.js +136 -0
- package/dist/middleware/auth.js.map +1 -0
- package/dist/middleware/cors-setup.d.ts +7 -0
- package/dist/middleware/cors-setup.d.ts.map +1 -0
- package/dist/middleware/cors-setup.js +8 -0
- package/dist/middleware/cors-setup.js.map +1 -0
- package/dist/middleware/error-handler.d.ts +4 -0
- package/dist/middleware/error-handler.d.ts.map +1 -0
- package/dist/middleware/error-handler.js +27 -0
- package/dist/middleware/error-handler.js.map +1 -0
- package/dist/middleware/query-parser.d.ts +11 -0
- package/dist/middleware/query-parser.d.ts.map +1 -0
- package/dist/middleware/query-parser.js +68 -0
- package/dist/middleware/query-parser.js.map +1 -0
- package/dist/middleware/request-logger.d.ts +4 -0
- package/dist/middleware/request-logger.d.ts.map +1 -0
- package/dist/middleware/request-logger.js +29 -0
- package/dist/middleware/request-logger.js.map +1 -0
- package/dist/process-daemon/index.d.ts +14 -0
- package/dist/process-daemon/index.d.ts.map +1 -0
- package/dist/process-daemon/index.js +51 -0
- package/dist/process-daemon/index.js.map +1 -0
- package/dist/process-daemon/process-daemon.d.ts +78 -0
- package/dist/process-daemon/process-daemon.d.ts.map +1 -0
- package/dist/process-daemon/process-daemon.js +568 -0
- package/dist/process-daemon/process-daemon.js.map +1 -0
- package/dist/process-daemon/process-manager-client.d.ts +108 -0
- package/dist/process-daemon/process-manager-client.d.ts.map +1 -0
- package/dist/process-daemon/process-manager-client.js +314 -0
- package/dist/process-daemon/process-manager-client.js.map +1 -0
- package/dist/process-daemon/process-manager-interface.d.ts +47 -0
- package/dist/process-daemon/process-manager-interface.d.ts.map +1 -0
- package/dist/process-daemon/process-manager-interface.js +8 -0
- package/dist/process-daemon/process-manager-interface.js.map +1 -0
- package/dist/process-daemon/test-daemon.d.ts +12 -0
- package/dist/process-daemon/test-daemon.d.ts.map +1 -0
- package/dist/process-daemon/test-daemon.js +81 -0
- package/dist/process-daemon/test-daemon.js.map +1 -0
- package/dist/process-daemon/types.d.ts +85 -0
- package/dist/process-daemon/types.d.ts.map +1 -0
- package/dist/process-daemon/types.js +8 -0
- package/dist/process-daemon/types.js.map +1 -0
- package/dist/routes/claudia.routes.d.ts +10 -0
- package/dist/routes/claudia.routes.d.ts.map +1 -0
- package/dist/routes/claudia.routes.js +123 -0
- package/dist/routes/claudia.routes.js.map +1 -0
- package/dist/routes/config.routes.d.ts +4 -0
- package/dist/routes/config.routes.d.ts.map +1 -0
- package/dist/routes/config.routes.js +27 -0
- package/dist/routes/config.routes.js.map +1 -0
- package/dist/routes/conversation.routes.d.ts +8 -0
- package/dist/routes/conversation.routes.d.ts.map +1 -0
- package/dist/routes/conversation.routes.js +870 -0
- package/dist/routes/conversation.routes.js.map +1 -0
- package/dist/routes/filesystem.routes.d.ts +4 -0
- package/dist/routes/filesystem.routes.d.ts.map +1 -0
- package/dist/routes/filesystem.routes.js +86 -0
- package/dist/routes/filesystem.routes.js.map +1 -0
- package/dist/routes/gemini.routes.d.ts +4 -0
- package/dist/routes/gemini.routes.d.ts.map +1 -0
- package/dist/routes/gemini.routes.js +93 -0
- package/dist/routes/gemini.routes.js.map +1 -0
- package/dist/routes/insights.routes.d.ts +17 -0
- package/dist/routes/insights.routes.d.ts.map +1 -0
- package/dist/routes/insights.routes.js +417 -0
- package/dist/routes/insights.routes.js.map +1 -0
- package/dist/routes/license.routes.d.ts +3 -0
- package/dist/routes/license.routes.d.ts.map +1 -0
- package/dist/routes/license.routes.js +111 -0
- package/dist/routes/license.routes.js.map +1 -0
- package/dist/routes/log.routes.d.ts +3 -0
- package/dist/routes/log.routes.d.ts.map +1 -0
- package/dist/routes/log.routes.js +65 -0
- package/dist/routes/log.routes.js.map +1 -0
- package/dist/routes/notifications.routes.d.ts +4 -0
- package/dist/routes/notifications.routes.d.ts.map +1 -0
- package/dist/routes/notifications.routes.js +71 -0
- package/dist/routes/notifications.routes.js.map +1 -0
- package/dist/routes/permission.routes.d.ts +4 -0
- package/dist/routes/permission.routes.d.ts.map +1 -0
- package/dist/routes/permission.routes.js +116 -0
- package/dist/routes/permission.routes.js.map +1 -0
- package/dist/routes/question.routes.d.ts +8 -0
- package/dist/routes/question.routes.d.ts.map +1 -0
- package/dist/routes/question.routes.js +82 -0
- package/dist/routes/question.routes.js.map +1 -0
- package/dist/routes/streaming.routes.d.ts +4 -0
- package/dist/routes/streaming.routes.d.ts.map +1 -0
- package/dist/routes/streaming.routes.js +28 -0
- package/dist/routes/streaming.routes.js.map +1 -0
- package/dist/routes/system.routes.d.ts +5 -0
- package/dist/routes/system.routes.d.ts.map +1 -0
- package/dist/routes/system.routes.js +103 -0
- package/dist/routes/system.routes.js.map +1 -0
- package/dist/routes/working-directories.routes.d.ts +4 -0
- package/dist/routes/working-directories.routes.d.ts.map +1 -0
- package/dist/routes/working-directories.routes.js +25 -0
- package/dist/routes/working-directories.routes.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +34 -0
- package/dist/server.js.map +1 -0
- package/dist/services/ToolMetricsService.d.ts +53 -0
- package/dist/services/ToolMetricsService.d.ts.map +1 -0
- package/dist/services/ToolMetricsService.js +230 -0
- package/dist/services/ToolMetricsService.js.map +1 -0
- package/dist/services/anthropic-service.d.ts +186 -0
- package/dist/services/anthropic-service.d.ts.map +1 -0
- package/dist/services/anthropic-service.js +1132 -0
- package/dist/services/anthropic-service.js.map +1 -0
- package/dist/services/claude-history-reader.d.ts +126 -0
- package/dist/services/claude-history-reader.d.ts.map +1 -0
- package/dist/services/claude-history-reader.js +717 -0
- package/dist/services/claude-history-reader.js.map +1 -0
- package/dist/services/claude-process-manager.d.ts +108 -0
- package/dist/services/claude-process-manager.d.ts.map +1 -0
- package/dist/services/claude-process-manager.js +909 -0
- package/dist/services/claude-process-manager.js.map +1 -0
- package/dist/services/claude-router-service.d.ts +19 -0
- package/dist/services/claude-router-service.d.ts.map +1 -0
- package/dist/services/claude-router-service.js +160 -0
- package/dist/services/claude-router-service.js.map +1 -0
- package/dist/services/claudia-service.d.ts +77 -0
- package/dist/services/claudia-service.d.ts.map +1 -0
- package/dist/services/claudia-service.js +194 -0
- package/dist/services/claudia-service.js.map +1 -0
- package/dist/services/commands-service.d.ts +18 -0
- package/dist/services/commands-service.d.ts.map +1 -0
- package/dist/services/commands-service.js +76 -0
- package/dist/services/commands-service.js.map +1 -0
- package/dist/services/config-service.d.ts +68 -0
- package/dist/services/config-service.d.ts.map +1 -0
- package/dist/services/config-service.js +429 -0
- package/dist/services/config-service.js.map +1 -0
- package/dist/services/conversation-cache.d.ts +86 -0
- package/dist/services/conversation-cache.d.ts.map +1 -0
- package/dist/services/conversation-cache.js +235 -0
- package/dist/services/conversation-cache.js.map +1 -0
- package/dist/services/conversation-status-manager.d.ts +98 -0
- package/dist/services/conversation-status-manager.d.ts.map +1 -0
- package/dist/services/conversation-status-manager.js +295 -0
- package/dist/services/conversation-status-manager.js.map +1 -0
- package/dist/services/cost-tracker.d.ts +87 -0
- package/dist/services/cost-tracker.d.ts.map +1 -0
- package/dist/services/cost-tracker.js +335 -0
- package/dist/services/cost-tracker.js.map +1 -0
- package/dist/services/file-system-service.d.ts +61 -0
- package/dist/services/file-system-service.d.ts.map +1 -0
- package/dist/services/file-system-service.js +348 -0
- package/dist/services/file-system-service.js.map +1 -0
- package/dist/services/gemini-service.d.ts +72 -0
- package/dist/services/gemini-service.d.ts.map +1 -0
- package/dist/services/gemini-service.js +431 -0
- package/dist/services/gemini-service.js.map +1 -0
- package/dist/services/insight-queue.d.ts +99 -0
- package/dist/services/insight-queue.d.ts.map +1 -0
- package/dist/services/insight-queue.js +277 -0
- package/dist/services/insight-queue.js.map +1 -0
- package/dist/services/insights-service.d.ts +102 -0
- package/dist/services/insights-service.d.ts.map +1 -0
- package/dist/services/insights-service.js +1152 -0
- package/dist/services/insights-service.js.map +1 -0
- package/dist/services/json-lines-parser.d.ts +19 -0
- package/dist/services/json-lines-parser.d.ts.map +1 -0
- package/dist/services/json-lines-parser.js +56 -0
- package/dist/services/json-lines-parser.js.map +1 -0
- package/dist/services/license-service.d.ts +69 -0
- package/dist/services/license-service.d.ts.map +1 -0
- package/dist/services/license-service.js +330 -0
- package/dist/services/license-service.js.map +1 -0
- package/dist/services/log-formatter.d.ts +5 -0
- package/dist/services/log-formatter.d.ts.map +1 -0
- package/dist/services/log-formatter.js +77 -0
- package/dist/services/log-formatter.js.map +1 -0
- package/dist/services/log-stream-buffer.d.ts +11 -0
- package/dist/services/log-stream-buffer.d.ts.map +1 -0
- package/dist/services/log-stream-buffer.js +36 -0
- package/dist/services/log-stream-buffer.js.map +1 -0
- package/dist/services/logger.d.ts +71 -0
- package/dist/services/logger.d.ts.map +1 -0
- package/dist/services/logger.js +215 -0
- package/dist/services/logger.js.map +1 -0
- package/dist/services/mcp-config-generator.d.ts +32 -0
- package/dist/services/mcp-config-generator.d.ts.map +1 -0
- package/dist/services/mcp-config-generator.js +126 -0
- package/dist/services/mcp-config-generator.js.map +1 -0
- package/dist/services/message-filter.d.ts +22 -0
- package/dist/services/message-filter.d.ts.map +1 -0
- package/dist/services/message-filter.js +57 -0
- package/dist/services/message-filter.js.map +1 -0
- package/dist/services/notification-service.d.ts +45 -0
- package/dist/services/notification-service.d.ts.map +1 -0
- package/dist/services/notification-service.js +184 -0
- package/dist/services/notification-service.js.map +1 -0
- package/dist/services/permission-tracker.d.ts +67 -0
- package/dist/services/permission-tracker.d.ts.map +1 -0
- package/dist/services/permission-tracker.js +161 -0
- package/dist/services/permission-tracker.js.map +1 -0
- package/dist/services/process-manager-factory.d.ts +81 -0
- package/dist/services/process-manager-factory.d.ts.map +1 -0
- package/dist/services/process-manager-factory.js +211 -0
- package/dist/services/process-manager-factory.js.map +1 -0
- package/dist/services/question-tracker.d.ts +47 -0
- package/dist/services/question-tracker.d.ts.map +1 -0
- package/dist/services/question-tracker.js +105 -0
- package/dist/services/question-tracker.js.map +1 -0
- package/dist/services/session-activity-watcher.d.ts +33 -0
- package/dist/services/session-activity-watcher.d.ts.map +1 -0
- package/dist/services/session-activity-watcher.js +194 -0
- package/dist/services/session-activity-watcher.js.map +1 -0
- package/dist/services/session-info-service.d.ts +228 -0
- package/dist/services/session-info-service.d.ts.map +1 -0
- package/dist/services/session-info-service.js +920 -0
- package/dist/services/session-info-service.js.map +1 -0
- package/dist/services/session-insights-service.d.ts +119 -0
- package/dist/services/session-insights-service.d.ts.map +1 -0
- package/dist/services/session-insights-service.js +889 -0
- package/dist/services/session-insights-service.js.map +1 -0
- package/dist/services/stream-manager.d.ts +62 -0
- package/dist/services/stream-manager.d.ts.map +1 -0
- package/dist/services/stream-manager.js +239 -0
- package/dist/services/stream-manager.js.map +1 -0
- package/dist/services/web-push-service.d.ts +48 -0
- package/dist/services/web-push-service.d.ts.map +1 -0
- package/dist/services/web-push-service.js +186 -0
- package/dist/services/web-push-service.js.map +1 -0
- package/dist/services/working-directories-service.d.ts +19 -0
- package/dist/services/working-directories-service.d.ts.map +1 -0
- package/dist/services/working-directories-service.js +103 -0
- package/dist/services/working-directories-service.js.map +1 -0
- package/dist/types/config.d.ts +111 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +14 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/express.d.ts +5 -0
- package/dist/types/express.d.ts.map +1 -0
- package/dist/types/express.js +2 -0
- package/dist/types/express.js.map +1 -0
- package/dist/types/index.d.ts +325 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/insights.d.ts +99 -0
- package/dist/types/insights.d.ts.map +1 -0
- package/dist/types/insights.js +7 -0
- package/dist/types/insights.js.map +1 -0
- package/dist/types/license.d.ts +70 -0
- package/dist/types/license.d.ts.map +1 -0
- package/dist/types/license.js +5 -0
- package/dist/types/license.js.map +1 -0
- package/dist/types/router-config.d.ts +13 -0
- package/dist/types/router-config.d.ts.map +1 -0
- package/dist/types/router-config.js +2 -0
- package/dist/types/router-config.js.map +1 -0
- package/dist/utils/constants.d.ts +26 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +28 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/machine-id.d.ts +7 -0
- package/dist/utils/machine-id.d.ts.map +1 -0
- package/dist/utils/machine-id.js +76 -0
- package/dist/utils/machine-id.js.map +1 -0
- package/dist/utils/server-startup.d.ts +13 -0
- package/dist/utils/server-startup.d.ts.map +1 -0
- package/dist/utils/server-startup.js +20 -0
- package/dist/utils/server-startup.js.map +1 -0
- package/dist/web/assets/main-DAc2rjJ2.css +1 -0
- package/dist/web/assets/main-DvlZ02mT.js +137 -0
- package/dist/web/favicon.png +0 -0
- package/dist/web/favicon.svg +22 -0
- package/dist/web/icon-192x192.png +0 -0
- package/dist/web/icon-512x512.png +0 -0
- package/dist/web/index.html +36 -0
- package/dist/web/manifest.json +61 -0
- package/package.json +174 -0
- package/scripts/postinstall.js +30 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
function j8(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(s,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tf={exports:{}},Ko={},nf={exports:{}},Xe={};var og;function E8(){if(og)return Xe;og=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.iterator;function y(z){return z===null||typeof z!="object"?null:(z=g&&z[g]||z["@@iterator"],typeof z=="function"?z:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,w={};function S(z,H,I){this.props=z,this.context=H,this.refs=w,this.updater=I||b}S.prototype.isReactComponent={},S.prototype.setState=function(z,H){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,H,"setState")},S.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function j(){}j.prototype=S.prototype;function E(z,H,I){this.props=z,this.context=H,this.refs=w,this.updater=I||b}var N=E.prototype=new j;N.constructor=E,k(N,S.prototype),N.isPureReactComponent=!0;var M=Array.isArray,_=Object.prototype.hasOwnProperty,R={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function L(z,H,I){var ie,se={},le=null,te=null;if(H!=null)for(ie in H.ref!==void 0&&(te=H.ref),H.key!==void 0&&(le=""+H.key),H)_.call(H,ie)&&!P.hasOwnProperty(ie)&&(se[ie]=H[ie]);var oe=arguments.length-2;if(oe===1)se.children=I;else if(1<oe){for(var ce=Array(oe),re=0;re<oe;re++)ce[re]=arguments[re+2];se.children=ce}if(z&&z.defaultProps)for(ie in oe=z.defaultProps,oe)se[ie]===void 0&&(se[ie]=oe[ie]);return{$$typeof:e,type:z,key:le,ref:te,props:se,_owner:R.current}}function G(z,H){return{$$typeof:e,type:z.type,key:H,ref:z.ref,props:z.props,_owner:z._owner}}function D(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function B(z){var H={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(I){return H[I]})}var W=/\/+/g;function Y(z,H){return typeof z=="object"&&z!==null&&z.key!=null?B(""+z.key):H.toString(36)}function Q(z,H,I,ie,se){var le=typeof z;(le==="undefined"||le==="boolean")&&(z=null);var te=!1;if(z===null)te=!0;else switch(le){case"string":case"number":te=!0;break;case"object":switch(z.$$typeof){case e:case t:te=!0}}if(te)return te=z,se=se(te),z=ie===""?"."+Y(te,0):ie,M(se)?(I="",z!=null&&(I=z.replace(W,"$&/")+"/"),Q(se,H,I,"",function(re){return re})):se!=null&&(D(se)&&(se=G(se,I+(!se.key||te&&te.key===se.key?"":(""+se.key).replace(W,"$&/")+"/")+z)),H.push(se)),1;if(te=0,ie=ie===""?".":ie+":",M(z))for(var oe=0;oe<z.length;oe++){le=z[oe];var ce=ie+Y(le,oe);te+=Q(le,H,I,ce,se)}else if(ce=y(z),typeof ce=="function")for(z=ce.call(z),oe=0;!(le=z.next()).done;)le=le.value,ce=ie+Y(le,oe++),te+=Q(le,H,I,ce,se);else if(le==="object")throw H=String(z),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return te}function F(z,H,I){if(z==null)return z;var ie=[],se=0;return Q(z,ie,"","",function(le){return H.call(I,le,se++)}),ie}function Z(z){if(z._status===-1){var H=z._result;H=H(),H.then(function(I){(z._status===0||z._status===-1)&&(z._status=1,z._result=I)},function(I){(z._status===0||z._status===-1)&&(z._status=2,z._result=I)}),z._status===-1&&(z._status=0,z._result=H)}if(z._status===1)return z._result.default;throw z._result}var K={current:null},O={transition:null},J={ReactCurrentDispatcher:K,ReactCurrentBatchConfig:O,ReactCurrentOwner:R};function T(){throw Error("act(...) is not supported in production builds of React.")}return Xe.Children={map:F,forEach:function(z,H,I){F(z,function(){H.apply(this,arguments)},I)},count:function(z){var H=0;return F(z,function(){H++}),H},toArray:function(z){return F(z,function(H){return H})||[]},only:function(z){if(!D(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},Xe.Component=S,Xe.Fragment=n,Xe.Profiler=o,Xe.PureComponent=E,Xe.StrictMode=s,Xe.Suspense=p,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Xe.act=T,Xe.cloneElement=function(z,H,I){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ie=k({},z.props),se=z.key,le=z.ref,te=z._owner;if(H!=null){if(H.ref!==void 0&&(le=H.ref,te=R.current),H.key!==void 0&&(se=""+H.key),z.type&&z.type.defaultProps)var oe=z.type.defaultProps;for(ce in H)_.call(H,ce)&&!P.hasOwnProperty(ce)&&(ie[ce]=H[ce]===void 0&&oe!==void 0?oe[ce]:H[ce])}var ce=arguments.length-2;if(ce===1)ie.children=I;else if(1<ce){oe=Array(ce);for(var re=0;re<ce;re++)oe[re]=arguments[re+2];ie.children=oe}return{$$typeof:e,type:z.type,key:se,ref:le,props:ie,_owner:te}},Xe.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:l,_context:z},z.Consumer=z},Xe.createElement=L,Xe.createFactory=function(z){var H=L.bind(null,z);return H.type=z,H},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(z){return{$$typeof:f,render:z}},Xe.isValidElement=D,Xe.lazy=function(z){return{$$typeof:h,_payload:{_status:-1,_result:z},_init:Z}},Xe.memo=function(z,H){return{$$typeof:m,type:z,compare:H===void 0?null:H}},Xe.startTransition=function(z){var H=O.transition;O.transition={};try{z()}finally{O.transition=H}},Xe.unstable_act=T,Xe.useCallback=function(z,H){return K.current.useCallback(z,H)},Xe.useContext=function(z){return K.current.useContext(z)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(z){return K.current.useDeferredValue(z)},Xe.useEffect=function(z,H){return K.current.useEffect(z,H)},Xe.useId=function(){return K.current.useId()},Xe.useImperativeHandle=function(z,H,I){return K.current.useImperativeHandle(z,H,I)},Xe.useInsertionEffect=function(z,H){return K.current.useInsertionEffect(z,H)},Xe.useLayoutEffect=function(z,H){return K.current.useLayoutEffect(z,H)},Xe.useMemo=function(z,H){return K.current.useMemo(z,H)},Xe.useReducer=function(z,H,I){return K.current.useReducer(z,H,I)},Xe.useRef=function(z){return K.current.useRef(z)},Xe.useState=function(z){return K.current.useState(z)},Xe.useSyncExternalStore=function(z,H,I){return K.current.useSyncExternalStore(z,H,I)},Xe.useTransition=function(){return K.current.useTransition()},Xe.version="18.3.1",Xe}var ag;function Tp(){return ag||(ag=1,nf.exports=E8()),nf.exports}var lg;function N8(){if(lg)return Ko;lg=1;var e=Tp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(f,p,m){var h,g={},y=null,b=null;m!==void 0&&(y=""+m),p.key!==void 0&&(y=""+p.key),p.ref!==void 0&&(b=p.ref);for(h in p)s.call(p,h)&&!l.hasOwnProperty(h)&&(g[h]=p[h]);if(f&&f.defaultProps)for(h in p=f.defaultProps,p)g[h]===void 0&&(g[h]=p[h]);return{$$typeof:t,type:f,key:y,ref:b,props:g,_owner:o.current}}return Ko.Fragment=n,Ko.jsx=c,Ko.jsxs=c,Ko}var cg;function A8(){return cg||(cg=1,tf.exports=N8()),tf.exports}var a=A8(),d=Tp();const jn=ja(d),Tc=j8({__proto__:null,default:jn},[d]);var Ul={},rf={exports:{}},kn={},sf={exports:{}},of={};var ug;function R8(){return ug||(ug=1,(function(e){function t(O,J){var T=O.length;O.push(J);e:for(;0<T;){var z=T-1>>>1,H=O[z];if(0<o(H,J))O[z]=J,O[T]=H,T=z;else break e}}function n(O){return O.length===0?null:O[0]}function s(O){if(O.length===0)return null;var J=O[0],T=O.pop();if(T!==J){O[0]=T;e:for(var z=0,H=O.length,I=H>>>1;z<I;){var ie=2*(z+1)-1,se=O[ie],le=ie+1,te=O[le];if(0>o(se,T))le<H&&0>o(te,se)?(O[z]=te,O[le]=T,z=le):(O[z]=se,O[ie]=T,z=ie);else if(le<H&&0>o(te,T))O[z]=te,O[le]=T,z=le;else break e}}return J}function o(O,J){var T=O.sortIndex-J.sortIndex;return T!==0?T:O.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],m=[],h=1,g=null,y=3,b=!1,k=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(O){for(var J=n(m);J!==null;){if(J.callback===null)s(m);else if(J.startTime<=O)s(m),J.sortIndex=J.expirationTime,t(p,J);else break;J=n(m)}}function M(O){if(w=!1,N(O),!k)if(n(p)!==null)k=!0,Z(_);else{var J=n(m);J!==null&&K(M,J.startTime-O)}}function _(O,J){k=!1,w&&(w=!1,j(L),L=-1),b=!0;var T=y;try{for(N(J),g=n(p);g!==null&&(!(g.expirationTime>J)||O&&!B());){var z=g.callback;if(typeof z=="function"){g.callback=null,y=g.priorityLevel;var H=z(g.expirationTime<=J);J=e.unstable_now(),typeof H=="function"?g.callback=H:g===n(p)&&s(p),N(J)}else s(p);g=n(p)}if(g!==null)var I=!0;else{var ie=n(m);ie!==null&&K(M,ie.startTime-J),I=!1}return I}finally{g=null,y=T,b=!1}}var R=!1,P=null,L=-1,G=5,D=-1;function B(){return!(e.unstable_now()-D<G)}function W(){if(P!==null){var O=e.unstable_now();D=O;var J=!0;try{J=P(!0,O)}finally{J?Y():(R=!1,P=null)}}else R=!1}var Y;if(typeof E=="function")Y=function(){E(W)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,F=Q.port2;Q.port1.onmessage=W,Y=function(){F.postMessage(null)}}else Y=function(){S(W,0)};function Z(O){P=O,R||(R=!0,Y())}function K(O,J){L=S(function(){O(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){k||b||(k=!0,Z(_))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(O){switch(y){case 1:case 2:case 3:var J=3;break;default:J=y}var T=y;y=J;try{return O()}finally{y=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,J){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var T=y;y=O;try{return J()}finally{y=T}},e.unstable_scheduleCallback=function(O,J,T){var z=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?z+T:z):T=z,O){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=T+H,O={id:h++,callback:J,priorityLevel:O,startTime:T,expirationTime:H,sortIndex:-1},T>z?(O.sortIndex=T,t(m,O),n(p)===null&&O===n(m)&&(w?(j(L),L=-1):w=!0,K(M,T-z))):(O.sortIndex=H,t(p,O),k||b||(k=!0,Z(_))),O},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(O){var J=y;return function(){var T=y;y=J;try{return O.apply(this,arguments)}finally{y=T}}}})(of)),of}var dg;function T8(){return dg||(dg=1,sf.exports=R8()),sf.exports}var fg;function I8(){if(fg)return kn;fg=1;var e=Tp(),t=T8();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,o={};function l(r,i){c(r,i),c(r+"Capture",i)}function c(r,i){for(o[r]=i,r=0;r<i.length;r++)s.add(i[r])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},g={};function y(r){return p.call(g,r)?!0:p.call(h,r)?!1:m.test(r)?g[r]=!0:(h[r]=!0,!1)}function b(r,i,u,x){if(u!==null&&u.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return x?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,i,u,x){if(i===null||typeof i>"u"||b(r,i,u,x))return!0;if(x)return!1;if(u!==null)switch(u.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function w(r,i,u,x,v,C,A){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=x,this.attributeNamespace=v,this.mustUseProperty=u,this.propertyName=r,this.type=i,this.sanitizeURL=C,this.removeEmptyString=A}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new w(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];S[i]=new w(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new w(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[r]=new w(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){S[r]=new w(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new w(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new w(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new w(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new w(r,5,!1,r.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function E(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(j,E);S[i]=new w(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(j,E);S[i]=new w(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(j,E);S[i]=new w(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new w(r,1,!1,r.toLowerCase(),null,!1,!1)}),S.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){S[r]=new w(r,1,!1,r.toLowerCase(),null,!0,!0)});function N(r,i,u,x){var v=S.hasOwnProperty(i)?S[i]:null;(v!==null?v.type!==0:x||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(k(i,u,v,x)&&(u=null),x||v===null?y(i)&&(u===null?r.removeAttribute(i):r.setAttribute(i,""+u)):v.mustUseProperty?r[v.propertyName]=u===null?v.type===3?!1:"":u:(i=v.attributeName,x=v.attributeNamespace,u===null?r.removeAttribute(i):(v=v.type,u=v===3||v===4&&u===!0?"":""+u,x?r.setAttributeNS(x,i,u):r.setAttribute(i,u))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),R=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),B=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),K=Symbol.for("react.offscreen"),O=Symbol.iterator;function J(r){return r===null||typeof r!="object"?null:(r=O&&r[O]||r["@@iterator"],typeof r=="function"?r:null)}var T=Object.assign,z;function H(r){if(z===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);z=i&&i[1]||""}return`
|
|
2
|
+
`+z+r}var I=!1;function ie(r,i){if(!r||I)return"";I=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(ne){var x=ne}Reflect.construct(r,[],i)}else{try{i.call()}catch(ne){x=ne}r.call(i.prototype)}else{try{throw Error()}catch(ne){x=ne}r()}}catch(ne){if(ne&&x&&typeof ne.stack=="string"){for(var v=ne.stack.split(`
|
|
3
|
+
`),C=x.stack.split(`
|
|
4
|
+
`),A=v.length-1,$=C.length-1;1<=A&&0<=$&&v[A]!==C[$];)$--;for(;1<=A&&0<=$;A--,$--)if(v[A]!==C[$]){if(A!==1||$!==1)do if(A--,$--,0>$||v[A]!==C[$]){var U=`
|
|
5
|
+
`+v[A].replace(" at new "," at ");return r.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",r.displayName)),U}while(1<=A&&0<=$);break}}}finally{I=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?H(r):""}function se(r){switch(r.tag){case 5:return H(r.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return r=ie(r.type,!1),r;case 11:return r=ie(r.type.render,!1),r;case 1:return r=ie(r.type,!0),r;default:return""}}function le(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case P:return"Fragment";case R:return"Portal";case G:return"Profiler";case L:return"StrictMode";case Y:return"Suspense";case Q:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case B:return(r.displayName||"Context")+".Consumer";case D:return(r._context.displayName||"Context")+".Provider";case W:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case F:return i=r.displayName||null,i!==null?i:le(r.type)||"Memo";case Z:i=r._payload,r=r._init;try{return le(r(i))}catch{}}return null}function te(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(i);case 8:return i===L?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function oe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ce(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function re(r){var i=ce(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),x=""+r[i];if(!r.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var v=u.get,C=u.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return v.call(this)},set:function(A){x=""+A,C.call(this,A)}}),Object.defineProperty(r,i,{enumerable:u.enumerable}),{getValue:function(){return x},setValue:function(A){x=""+A},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ge(r){r._valueTracker||(r._valueTracker=re(r))}function be(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var u=i.getValue(),x="";return r&&(x=ce(r)?r.checked?"true":"false":r.value),r=x,r!==u?(i.setValue(r),!0):!1}function Pe(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Ze(r,i){var u=i.checked;return T({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function ct(r,i){var u=i.defaultValue==null?"":i.defaultValue,x=i.checked!=null?i.checked:i.defaultChecked;u=oe(i.value!=null?i.value:u),r._wrapperState={initialChecked:x,initialValue:u,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function ft(r,i){i=i.checked,i!=null&&N(r,"checked",i,!1)}function Ye(r,i){ft(r,i);var u=oe(i.value),x=i.type;if(u!=null)x==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(x==="submit"||x==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?et(r,i.type,u):i.hasOwnProperty("defaultValue")&&et(r,i.type,oe(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function jt(r,i,u){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var x=i.type;if(!(x!=="submit"&&x!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,u||i===r.value||(r.value=i),r.defaultValue=i}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function et(r,i,u){(i!=="number"||Pe(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Kt=Array.isArray;function Qt(r,i,u,x){if(r=r.options,i){i={};for(var v=0;v<u.length;v++)i["$"+u[v]]=!0;for(u=0;u<r.length;u++)v=i.hasOwnProperty("$"+r[u].value),r[u].selected!==v&&(r[u].selected=v),v&&x&&(r[u].defaultSelected=!0)}else{for(u=""+oe(u),i=null,v=0;v<r.length;v++){if(r[v].value===u){r[v].selected=!0,x&&(r[v].defaultSelected=!0);return}i!==null||r[v].disabled||(i=r[v])}i!==null&&(i.selected=!0)}}function nn(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return T({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function vt(r,i){var u=i.value;if(u==null){if(u=i.children,i=i.defaultValue,u!=null){if(i!=null)throw Error(n(92));if(Kt(u)){if(1<u.length)throw Error(n(93));u=u[0]}i=u}i==null&&(i=""),u=i}r._wrapperState={initialValue:oe(u)}}function Bn(r,i){var u=oe(i.value),x=oe(i.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),i.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),x!=null&&(r.defaultValue=""+x)}function rr(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function ae(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?ae(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var de,fe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,u,x,v){MSApp.execUnsafeLocalFunction(function(){return r(i,u,x,v)})}:r})(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(de=de||document.createElement("div"),de.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=de.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function ke(r,i){if(i){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=i;return}}r.textContent=i}var Be={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ke=["Webkit","ms","Moz","O"];Object.keys(Be).forEach(function(r){Ke.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Be[i]=Be[r]})});function it(r,i,u){return i==null||typeof i=="boolean"||i===""?"":u||typeof i!="number"||i===0||Be.hasOwnProperty(r)&&Be[r]?(""+i).trim():i+"px"}function ot(r,i){r=r.style;for(var u in i)if(i.hasOwnProperty(u)){var x=u.indexOf("--")===0,v=it(u,i[u],x);u==="float"&&(u="cssFloat"),x?r.setProperty(u,v):r[u]=v}}var bt=T({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ht(r,i){if(i){if(bt[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Lt(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ft=null;function Tn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Fr=null,sr=null,ir=null;function fi(r){if(r=_o(r)){if(typeof Fr!="function")throw Error(n(280));var i=r.stateNode;i&&(i=il(i),Fr(r.stateNode,r.type,i))}}function Or(r){sr?ir?ir.push(r):ir=[r]:sr=r}function we(){if(sr){var r=sr,i=ir;if(ir=sr=null,fi(r),i)for(r=0;r<i.length;r++)fi(i[r])}}function Fe(r,i){return r(i)}function qe(){}var tt=!1;function gt(r,i,u){if(tt)return r(i,u);tt=!0;try{return Fe(r,i,u)}finally{tt=!1,(sr!==null||ir!==null)&&(qe(),we())}}function zt(r,i){var u=r.stateNode;if(u===null)return null;var x=il(u);if(x===null)return null;u=x[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(x=!x.disabled)||(r=r.type,x=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!x;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,i,typeof u));return u}var or=!1;if(f)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){or=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{or=!1}function _e(r,i,u,x,v,C,A,$,U){var ne=Array.prototype.slice.call(arguments,3);try{i.apply(u,ne)}catch(me){this.onError(me)}}var Vn=!1,Dr=null,pi=!1,mo=null,mu={onError:function(r){Vn=!0,Dr=r}};function hu(r,i,u,x,v,C,A,$,U){Vn=!1,Dr=null,_e.apply(mu,arguments)}function gu(r,i,u,x,v,C,A,$,U){if(hu.apply(this,arguments),Vn){if(Vn){var ne=Dr;Vn=!1,Dr=null}else throw Error(n(198));pi||(pi=!0,mo=ne)}}function zr(r){var i=r,u=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(u=i.return),r=i.return;while(r)}return i.tag===3?u:null}function Fa(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function Oa(r){if(zr(r)!==r)throw Error(n(188))}function $t(r){var i=r.alternate;if(!i){if(i=zr(r),i===null)throw Error(n(188));return i!==r?null:r}for(var u=r,x=i;;){var v=u.return;if(v===null)break;var C=v.alternate;if(C===null){if(x=v.return,x!==null){u=x;continue}break}if(v.child===C.child){for(C=v.child;C;){if(C===u)return Oa(v),r;if(C===x)return Oa(v),i;C=C.sibling}throw Error(n(188))}if(u.return!==x.return)u=v,x=C;else{for(var A=!1,$=v.child;$;){if($===u){A=!0,u=v,x=C;break}if($===x){A=!0,x=v,u=C;break}$=$.sibling}if(!A){for($=C.child;$;){if($===u){A=!0,u=C,x=v;break}if($===x){A=!0,x=C,u=v;break}$=$.sibling}if(!A)throw Error(n(189))}}if(u.alternate!==x)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:i}function Da(r){return r=$t(r),r!==null?za(r):null}function za(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=za(r);if(i!==null)return i;r=r.sibling}return null}var $a=t.unstable_scheduleCallback,ho=t.unstable_cancelCallback,xu=t.unstable_shouldYield,yu=t.unstable_requestPaint,Rt=t.unstable_now,vu=t.unstable_getCurrentPriorityLevel,go=t.unstable_ImmediatePriority,Ha=t.unstable_UserBlockingPriority,mi=t.unstable_NormalPriority,bu=t.unstable_LowPriority,Ba=t.unstable_IdlePriority,hi=null,Un=null;function wu(r){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(hi,r,void 0,(r.current.flags&128)===128)}catch{}}var In=Math.clz32?Math.clz32:Cu,ku=Math.log,Su=Math.LN2;function Cu(r){return r>>>=0,r===0?32:31-(ku(r)/Su|0)|0}var xt=64,V=4194304;function Se(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function rt(r,i){var u=r.pendingLanes;if(u===0)return 0;var x=0,v=r.suspendedLanes,C=r.pingedLanes,A=u&268435455;if(A!==0){var $=A&~v;$!==0?x=Se($):(C&=A,C!==0&&(x=Se(C)))}else A=u&~v,A!==0?x=Se(A):C!==0&&(x=Se(C));if(x===0)return 0;if(i!==0&&i!==x&&(i&v)===0&&(v=x&-x,C=i&-i,v>=C||v===16&&(C&4194240)!==0))return i;if((x&4)!==0&&(x|=u&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=x;0<i;)u=31-In(i),v=1<<u,x|=r[u],i&=~v;return x}function at(r,i){switch(r){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gn(r,i){for(var u=r.suspendedLanes,x=r.pingedLanes,v=r.expirationTimes,C=r.pendingLanes;0<C;){var A=31-In(C),$=1<<A,U=v[A];U===-1?(($&u)===0||($&x)!==0)&&(v[A]=at($,i)):U<=i&&(r.expiredLanes|=$),C&=~$}}function pt(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Zn(){var r=xt;return xt<<=1,(xt&4194240)===0&&(xt=64),r}function Ht(r){for(var i=[],u=0;31>u;u++)i.push(r);return i}function $r(r,i,u){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-In(i),r[i]=u}function ju(r,i){var u=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var x=r.eventTimes;for(r=r.expirationTimes;0<u;){var v=31-In(u),C=1<<v;i[v]=0,x[v]=-1,r[v]=-1,u&=~C}}function xo(r,i){var u=r.entangledLanes|=i;for(r=r.entanglements;u;){var x=31-In(u),v=1<<x;v&i|r[x]&i&&(r[x]|=i),u&=~v}}var ut=0;function zs(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Wn,gi,Va,Hm,Bm,Eu=!1,Ua=[],ss=null,is=null,os=null,yo=new Map,vo=new Map,as=[],q4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vm(r,i){switch(r){case"focusin":case"focusout":ss=null;break;case"dragenter":case"dragleave":is=null;break;case"mouseover":case"mouseout":os=null;break;case"pointerover":case"pointerout":yo.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":vo.delete(i.pointerId)}}function bo(r,i,u,x,v,C){return r===null||r.nativeEvent!==C?(r={blockedOn:i,domEventName:u,eventSystemFlags:x,nativeEvent:C,targetContainers:[v]},i!==null&&(i=_o(i),i!==null&&gi(i)),r):(r.eventSystemFlags|=x,i=r.targetContainers,v!==null&&i.indexOf(v)===-1&&i.push(v),r)}function G4(r,i,u,x,v){switch(i){case"focusin":return ss=bo(ss,r,i,u,x,v),!0;case"dragenter":return is=bo(is,r,i,u,x,v),!0;case"mouseover":return os=bo(os,r,i,u,x,v),!0;case"pointerover":var C=v.pointerId;return yo.set(C,bo(yo.get(C)||null,r,i,u,x,v)),!0;case"gotpointercapture":return C=v.pointerId,vo.set(C,bo(vo.get(C)||null,r,i,u,x,v)),!0}return!1}function Um(r){var i=$s(r.target);if(i!==null){var u=zr(i);if(u!==null){if(i=u.tag,i===13){if(i=Fa(u),i!==null){r.blockedOn=i,Bm(r.priority,function(){Va(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Za(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var u=Au(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var x=new u.constructor(u.type,u);Ft=x,u.target.dispatchEvent(x),Ft=null}else return i=_o(u),i!==null&&gi(i),r.blockedOn=u,!1;i.shift()}return!0}function Zm(r,i,u){Za(r)&&u.delete(i)}function K4(){Eu=!1,ss!==null&&Za(ss)&&(ss=null),is!==null&&Za(is)&&(is=null),os!==null&&Za(os)&&(os=null),yo.forEach(Zm),vo.forEach(Zm)}function wo(r,i){r.blockedOn===i&&(r.blockedOn=null,Eu||(Eu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,K4)))}function ko(r){function i(v){return wo(v,r)}if(0<Ua.length){wo(Ua[0],r);for(var u=1;u<Ua.length;u++){var x=Ua[u];x.blockedOn===r&&(x.blockedOn=null)}}for(ss!==null&&wo(ss,r),is!==null&&wo(is,r),os!==null&&wo(os,r),yo.forEach(i),vo.forEach(i),u=0;u<as.length;u++)x=as[u],x.blockedOn===r&&(x.blockedOn=null);for(;0<as.length&&(u=as[0],u.blockedOn===null);)Um(u),u.blockedOn===null&&as.shift()}var xi=M.ReactCurrentBatchConfig,Wa=!0;function Q4(r,i,u,x){var v=ut,C=xi.transition;xi.transition=null;try{ut=1,Nu(r,i,u,x)}finally{ut=v,xi.transition=C}}function Y4(r,i,u,x){var v=ut,C=xi.transition;xi.transition=null;try{ut=4,Nu(r,i,u,x)}finally{ut=v,xi.transition=C}}function Nu(r,i,u,x){if(Wa){var v=Au(r,i,u,x);if(v===null)Zu(r,i,x,qa,u),Vm(r,x);else if(G4(v,r,i,u,x))x.stopPropagation();else if(Vm(r,x),i&4&&-1<q4.indexOf(r)){for(;v!==null;){var C=_o(v);if(C!==null&&Wn(C),C=Au(r,i,u,x),C===null&&Zu(r,i,x,qa,u),C===v)break;v=C}v!==null&&x.stopPropagation()}else Zu(r,i,x,null,u)}}var qa=null;function Au(r,i,u,x){if(qa=null,r=Tn(x),r=$s(r),r!==null)if(i=zr(r),i===null)r=null;else if(u=i.tag,u===13){if(r=Fa(i),r!==null)return r;r=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return qa=r,null}function Wm(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vu()){case go:return 1;case Ha:return 4;case mi:case bu:return 16;case Ba:return 536870912;default:return 16}default:return 16}}var ls=null,Ru=null,Ga=null;function qm(){if(Ga)return Ga;var r,i=Ru,u=i.length,x,v="value"in ls?ls.value:ls.textContent,C=v.length;for(r=0;r<u&&i[r]===v[r];r++);var A=u-r;for(x=1;x<=A&&i[u-x]===v[C-x];x++);return Ga=v.slice(r,1<x?1-x:void 0)}function Ka(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Qa(){return!0}function Gm(){return!1}function Pn(r){function i(u,x,v,C,A){this._reactName=u,this._targetInst=v,this.type=x,this.nativeEvent=C,this.target=A,this.currentTarget=null;for(var $ in r)r.hasOwnProperty($)&&(u=r[$],this[$]=u?u(C):C[$]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?Qa:Gm,this.isPropagationStopped=Gm,this}return T(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),i}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tu=Pn(yi),So=T({},yi,{view:0,detail:0}),X4=Pn(So),Iu,Pu,Co,Ya=T({},So,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_u,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Co&&(Co&&r.type==="mousemove"?(Iu=r.screenX-Co.screenX,Pu=r.screenY-Co.screenY):Pu=Iu=0,Co=r),Iu)},movementY:function(r){return"movementY"in r?r.movementY:Pu}}),Km=Pn(Ya),J4=T({},Ya,{dataTransfer:0}),ew=Pn(J4),tw=T({},So,{relatedTarget:0}),Mu=Pn(tw),nw=T({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),rw=Pn(nw),sw=T({},yi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),iw=Pn(sw),ow=T({},yi,{data:0}),Qm=Pn(ow),aw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uw(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=cw[r])?!!i[r]:!1}function _u(){return uw}var dw=T({},So,{key:function(r){if(r.key){var i=aw[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Ka(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?lw[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_u,charCode:function(r){return r.type==="keypress"?Ka(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ka(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),fw=Pn(dw),pw=T({},Ya,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ym=Pn(pw),mw=T({},So,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_u}),hw=Pn(mw),gw=T({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),xw=Pn(gw),yw=T({},Ya,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),vw=Pn(yw),bw=[9,13,27,32],Lu=f&&"CompositionEvent"in window,jo=null;f&&"documentMode"in document&&(jo=document.documentMode);var ww=f&&"TextEvent"in window&&!jo,Xm=f&&(!Lu||jo&&8<jo&&11>=jo),Jm=" ",eh=!1;function th(r,i){switch(r){case"keyup":return bw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var vi=!1;function kw(r,i){switch(r){case"compositionend":return nh(i);case"keypress":return i.which!==32?null:(eh=!0,Jm);case"textInput":return r=i.data,r===Jm&&eh?null:r;default:return null}}function Sw(r,i){if(vi)return r==="compositionend"||!Lu&&th(r,i)?(r=qm(),Ga=Ru=ls=null,vi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Xm&&i.locale!=="ko"?null:i.data;default:return null}}var Cw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rh(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!Cw[r.type]:i==="textarea"}function sh(r,i,u,x){Or(x),i=nl(i,"onChange"),0<i.length&&(u=new Tu("onChange","change",null,u,x),r.push({event:u,listeners:i}))}var Eo=null,No=null;function jw(r){kh(r,0)}function Xa(r){var i=Ci(r);if(be(i))return r}function Ew(r,i){if(r==="change")return i}var ih=!1;if(f){var Fu;if(f){var Ou="oninput"in document;if(!Ou){var oh=document.createElement("div");oh.setAttribute("oninput","return;"),Ou=typeof oh.oninput=="function"}Fu=Ou}else Fu=!1;ih=Fu&&(!document.documentMode||9<document.documentMode)}function ah(){Eo&&(Eo.detachEvent("onpropertychange",lh),No=Eo=null)}function lh(r){if(r.propertyName==="value"&&Xa(No)){var i=[];sh(i,No,r,Tn(r)),gt(jw,i)}}function Nw(r,i,u){r==="focusin"?(ah(),Eo=i,No=u,Eo.attachEvent("onpropertychange",lh)):r==="focusout"&&ah()}function Aw(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Xa(No)}function Rw(r,i){if(r==="click")return Xa(i)}function Tw(r,i){if(r==="input"||r==="change")return Xa(i)}function Iw(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var ar=typeof Object.is=="function"?Object.is:Iw;function Ao(r,i){if(ar(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var u=Object.keys(r),x=Object.keys(i);if(u.length!==x.length)return!1;for(x=0;x<u.length;x++){var v=u[x];if(!p.call(i,v)||!ar(r[v],i[v]))return!1}return!0}function ch(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function uh(r,i){var u=ch(r);r=0;for(var x;u;){if(u.nodeType===3){if(x=r+u.textContent.length,r<=i&&x>=i)return{node:u,offset:i-r};r=x}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ch(u)}}function dh(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?dh(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function fh(){for(var r=window,i=Pe();i instanceof r.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)r=i.contentWindow;else break;i=Pe(r.document)}return i}function Du(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function Pw(r){var i=fh(),u=r.focusedElem,x=r.selectionRange;if(i!==u&&u&&u.ownerDocument&&dh(u.ownerDocument.documentElement,u)){if(x!==null&&Du(u)){if(i=x.start,r=x.end,r===void 0&&(r=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(r,u.value.length);else if(r=(i=u.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var v=u.textContent.length,C=Math.min(x.start,v);x=x.end===void 0?C:Math.min(x.end,v),!r.extend&&C>x&&(v=x,x=C,C=v),v=uh(u,C);var A=uh(u,x);v&&A&&(r.rangeCount!==1||r.anchorNode!==v.node||r.anchorOffset!==v.offset||r.focusNode!==A.node||r.focusOffset!==A.offset)&&(i=i.createRange(),i.setStart(v.node,v.offset),r.removeAllRanges(),C>x?(r.addRange(i),r.extend(A.node,A.offset)):(i.setEnd(A.node,A.offset),r.addRange(i)))}}for(i=[],r=u;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<i.length;u++)r=i[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var Mw=f&&"documentMode"in document&&11>=document.documentMode,bi=null,zu=null,Ro=null,$u=!1;function ph(r,i,u){var x=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;$u||bi==null||bi!==Pe(x)||(x=bi,"selectionStart"in x&&Du(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),Ro&&Ao(Ro,x)||(Ro=x,x=nl(zu,"onSelect"),0<x.length&&(i=new Tu("onSelect","select",null,i,u),r.push({event:i,listeners:x}),i.target=bi)))}function Ja(r,i){var u={};return u[r.toLowerCase()]=i.toLowerCase(),u["Webkit"+r]="webkit"+i,u["Moz"+r]="moz"+i,u}var wi={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionend:Ja("Transition","TransitionEnd")},Hu={},mh={};f&&(mh=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);function el(r){if(Hu[r])return Hu[r];if(!wi[r])return r;var i=wi[r],u;for(u in i)if(i.hasOwnProperty(u)&&u in mh)return Hu[r]=i[u];return r}var hh=el("animationend"),gh=el("animationiteration"),xh=el("animationstart"),yh=el("transitionend"),vh=new Map,bh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function cs(r,i){vh.set(r,i),l(i,[r])}for(var Bu=0;Bu<bh.length;Bu++){var Vu=bh[Bu],_w=Vu.toLowerCase(),Lw=Vu[0].toUpperCase()+Vu.slice(1);cs(_w,"on"+Lw)}cs(hh,"onAnimationEnd"),cs(gh,"onAnimationIteration"),cs(xh,"onAnimationStart"),cs("dblclick","onDoubleClick"),cs("focusin","onFocus"),cs("focusout","onBlur"),cs(yh,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var To="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fw=new Set("cancel close invalid load scroll toggle".split(" ").concat(To));function wh(r,i,u){var x=r.type||"unknown-event";r.currentTarget=u,gu(x,i,void 0,r),r.currentTarget=null}function kh(r,i){i=(i&4)!==0;for(var u=0;u<r.length;u++){var x=r[u],v=x.event;x=x.listeners;e:{var C=void 0;if(i)for(var A=x.length-1;0<=A;A--){var $=x[A],U=$.instance,ne=$.currentTarget;if($=$.listener,U!==C&&v.isPropagationStopped())break e;wh(v,$,ne),C=U}else for(A=0;A<x.length;A++){if($=x[A],U=$.instance,ne=$.currentTarget,$=$.listener,U!==C&&v.isPropagationStopped())break e;wh(v,$,ne),C=U}}}if(pi)throw r=mo,pi=!1,mo=null,r}function St(r,i){var u=i[Yu];u===void 0&&(u=i[Yu]=new Set);var x=r+"__bubble";u.has(x)||(Sh(i,r,2,!1),u.add(x))}function Uu(r,i,u){var x=0;i&&(x|=4),Sh(u,r,x,i)}var tl="_reactListening"+Math.random().toString(36).slice(2);function Io(r){if(!r[tl]){r[tl]=!0,s.forEach(function(u){u!=="selectionchange"&&(Fw.has(u)||Uu(u,!1,r),Uu(u,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[tl]||(i[tl]=!0,Uu("selectionchange",!1,i))}}function Sh(r,i,u,x){switch(Wm(i)){case 1:var v=Q4;break;case 4:v=Y4;break;default:v=Nu}u=v.bind(null,i,u,r),v=void 0,!or||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(v=!0),x?v!==void 0?r.addEventListener(i,u,{capture:!0,passive:v}):r.addEventListener(i,u,!0):v!==void 0?r.addEventListener(i,u,{passive:v}):r.addEventListener(i,u,!1)}function Zu(r,i,u,x,v){var C=x;if((i&1)===0&&(i&2)===0&&x!==null)e:for(;;){if(x===null)return;var A=x.tag;if(A===3||A===4){var $=x.stateNode.containerInfo;if($===v||$.nodeType===8&&$.parentNode===v)break;if(A===4)for(A=x.return;A!==null;){var U=A.tag;if((U===3||U===4)&&(U=A.stateNode.containerInfo,U===v||U.nodeType===8&&U.parentNode===v))return;A=A.return}for(;$!==null;){if(A=$s($),A===null)return;if(U=A.tag,U===5||U===6){x=C=A;continue e}$=$.parentNode}}x=x.return}gt(function(){var ne=C,me=Tn(u),he=[];e:{var pe=vh.get(r);if(pe!==void 0){var Ce=Tu,Re=r;switch(r){case"keypress":if(Ka(u)===0)break e;case"keydown":case"keyup":Ce=fw;break;case"focusin":Re="focus",Ce=Mu;break;case"focusout":Re="blur",Ce=Mu;break;case"beforeblur":case"afterblur":Ce=Mu;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ce=Km;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ce=ew;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ce=hw;break;case hh:case gh:case xh:Ce=rw;break;case yh:Ce=xw;break;case"scroll":Ce=X4;break;case"wheel":Ce=vw;break;case"copy":case"cut":case"paste":Ce=iw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ce=Ym}var Me=(i&4)!==0,_t=!Me&&r==="scroll",X=Me?pe!==null?pe+"Capture":null:pe;Me=[];for(var q=ne,ee;q!==null;){ee=q;var ve=ee.stateNode;if(ee.tag===5&&ve!==null&&(ee=ve,X!==null&&(ve=zt(q,X),ve!=null&&Me.push(Po(q,ve,ee)))),_t)break;q=q.return}0<Me.length&&(pe=new Ce(pe,Re,null,u,me),he.push({event:pe,listeners:Me}))}}if((i&7)===0){e:{if(pe=r==="mouseover"||r==="pointerover",Ce=r==="mouseout"||r==="pointerout",pe&&u!==Ft&&(Re=u.relatedTarget||u.fromElement)&&($s(Re)||Re[Hr]))break e;if((Ce||pe)&&(pe=me.window===me?me:(pe=me.ownerDocument)?pe.defaultView||pe.parentWindow:window,Ce?(Re=u.relatedTarget||u.toElement,Ce=ne,Re=Re?$s(Re):null,Re!==null&&(_t=zr(Re),Re!==_t||Re.tag!==5&&Re.tag!==6)&&(Re=null)):(Ce=null,Re=ne),Ce!==Re)){if(Me=Km,ve="onMouseLeave",X="onMouseEnter",q="mouse",(r==="pointerout"||r==="pointerover")&&(Me=Ym,ve="onPointerLeave",X="onPointerEnter",q="pointer"),_t=Ce==null?pe:Ci(Ce),ee=Re==null?pe:Ci(Re),pe=new Me(ve,q+"leave",Ce,u,me),pe.target=_t,pe.relatedTarget=ee,ve=null,$s(me)===ne&&(Me=new Me(X,q+"enter",Re,u,me),Me.target=ee,Me.relatedTarget=_t,ve=Me),_t=ve,Ce&&Re)t:{for(Me=Ce,X=Re,q=0,ee=Me;ee;ee=ki(ee))q++;for(ee=0,ve=X;ve;ve=ki(ve))ee++;for(;0<q-ee;)Me=ki(Me),q--;for(;0<ee-q;)X=ki(X),ee--;for(;q--;){if(Me===X||X!==null&&Me===X.alternate)break t;Me=ki(Me),X=ki(X)}Me=null}else Me=null;Ce!==null&&Ch(he,pe,Ce,Me,!1),Re!==null&&_t!==null&&Ch(he,_t,Re,Me,!0)}}e:{if(pe=ne?Ci(ne):window,Ce=pe.nodeName&&pe.nodeName.toLowerCase(),Ce==="select"||Ce==="input"&&pe.type==="file")var Le=Ew;else if(rh(pe))if(ih)Le=Tw;else{Le=Aw;var De=Nw}else(Ce=pe.nodeName)&&Ce.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(Le=Rw);if(Le&&(Le=Le(r,ne))){sh(he,Le,u,me);break e}De&&De(r,pe,ne),r==="focusout"&&(De=pe._wrapperState)&&De.controlled&&pe.type==="number"&&et(pe,"number",pe.value)}switch(De=ne?Ci(ne):window,r){case"focusin":(rh(De)||De.contentEditable==="true")&&(bi=De,zu=ne,Ro=null);break;case"focusout":Ro=zu=bi=null;break;case"mousedown":$u=!0;break;case"contextmenu":case"mouseup":case"dragend":$u=!1,ph(he,u,me);break;case"selectionchange":if(Mw)break;case"keydown":case"keyup":ph(he,u,me)}var ze;if(Lu)e:{switch(r){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else vi?th(r,u)&&(Ue="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ue="onCompositionStart");Ue&&(Xm&&u.locale!=="ko"&&(vi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&vi&&(ze=qm()):(ls=me,Ru="value"in ls?ls.value:ls.textContent,vi=!0)),De=nl(ne,Ue),0<De.length&&(Ue=new Qm(Ue,r,null,u,me),he.push({event:Ue,listeners:De}),ze?Ue.data=ze:(ze=nh(u),ze!==null&&(Ue.data=ze)))),(ze=ww?kw(r,u):Sw(r,u))&&(ne=nl(ne,"onBeforeInput"),0<ne.length&&(me=new Qm("onBeforeInput","beforeinput",null,u,me),he.push({event:me,listeners:ne}),me.data=ze))}kh(he,i)})}function Po(r,i,u){return{instance:r,listener:i,currentTarget:u}}function nl(r,i){for(var u=i+"Capture",x=[];r!==null;){var v=r,C=v.stateNode;v.tag===5&&C!==null&&(v=C,C=zt(r,u),C!=null&&x.unshift(Po(r,C,v)),C=zt(r,i),C!=null&&x.push(Po(r,C,v))),r=r.return}return x}function ki(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Ch(r,i,u,x,v){for(var C=i._reactName,A=[];u!==null&&u!==x;){var $=u,U=$.alternate,ne=$.stateNode;if(U!==null&&U===x)break;$.tag===5&&ne!==null&&($=ne,v?(U=zt(u,C),U!=null&&A.unshift(Po(u,U,$))):v||(U=zt(u,C),U!=null&&A.push(Po(u,U,$)))),u=u.return}A.length!==0&&r.push({event:i,listeners:A})}var Ow=/\r\n?/g,Dw=/\u0000|\uFFFD/g;function jh(r){return(typeof r=="string"?r:""+r).replace(Ow,`
|
|
6
|
+
`).replace(Dw,"")}function rl(r,i,u){if(i=jh(i),jh(r)!==i&&u)throw Error(n(425))}function sl(){}var Wu=null,qu=null;function Gu(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Ku=typeof setTimeout=="function"?setTimeout:void 0,zw=typeof clearTimeout=="function"?clearTimeout:void 0,Eh=typeof Promise=="function"?Promise:void 0,$w=typeof queueMicrotask=="function"?queueMicrotask:typeof Eh<"u"?function(r){return Eh.resolve(null).then(r).catch(Hw)}:Ku;function Hw(r){setTimeout(function(){throw r})}function Qu(r,i){var u=i,x=0;do{var v=u.nextSibling;if(r.removeChild(u),v&&v.nodeType===8)if(u=v.data,u==="/$"){if(x===0){r.removeChild(v),ko(i);return}x--}else u!=="$"&&u!=="$?"&&u!=="$!"||x++;u=v}while(u);ko(i)}function us(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function Nh(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(i===0)return r;i--}else u==="/$"&&i++}r=r.previousSibling}return null}var Si=Math.random().toString(36).slice(2),vr="__reactFiber$"+Si,Mo="__reactProps$"+Si,Hr="__reactContainer$"+Si,Yu="__reactEvents$"+Si,Bw="__reactListeners$"+Si,Vw="__reactHandles$"+Si;function $s(r){var i=r[vr];if(i)return i;for(var u=r.parentNode;u;){if(i=u[Hr]||u[vr]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(r=Nh(r);r!==null;){if(u=r[vr])return u;r=Nh(r)}return i}r=u,u=r.parentNode}return null}function _o(r){return r=r[vr]||r[Hr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ci(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function il(r){return r[Mo]||null}var Xu=[],ji=-1;function ds(r){return{current:r}}function Ct(r){0>ji||(r.current=Xu[ji],Xu[ji]=null,ji--)}function wt(r,i){ji++,Xu[ji]=r.current,r.current=i}var fs={},rn=ds(fs),xn=ds(!1),Hs=fs;function Ei(r,i){var u=r.type.contextTypes;if(!u)return fs;var x=r.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===i)return x.__reactInternalMemoizedMaskedChildContext;var v={},C;for(C in u)v[C]=i[C];return x&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=v),v}function yn(r){return r=r.childContextTypes,r!=null}function ol(){Ct(xn),Ct(rn)}function Ah(r,i,u){if(rn.current!==fs)throw Error(n(168));wt(rn,i),wt(xn,u)}function Rh(r,i,u){var x=r.stateNode;if(i=i.childContextTypes,typeof x.getChildContext!="function")return u;x=x.getChildContext();for(var v in x)if(!(v in i))throw Error(n(108,te(r)||"Unknown",v));return T({},u,x)}function al(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||fs,Hs=rn.current,wt(rn,r),wt(xn,xn.current),!0}function Th(r,i,u){var x=r.stateNode;if(!x)throw Error(n(169));u?(r=Rh(r,i,Hs),x.__reactInternalMemoizedMergedChildContext=r,Ct(xn),Ct(rn),wt(rn,r)):Ct(xn),wt(xn,u)}var Br=null,ll=!1,Ju=!1;function Ih(r){Br===null?Br=[r]:Br.push(r)}function Uw(r){ll=!0,Ih(r)}function ps(){if(!Ju&&Br!==null){Ju=!0;var r=0,i=ut;try{var u=Br;for(ut=1;r<u.length;r++){var x=u[r];do x=x(!0);while(x!==null)}Br=null,ll=!1}catch(v){throw Br!==null&&(Br=Br.slice(r+1)),$a(go,ps),v}finally{ut=i,Ju=!1}}return null}var Ni=[],Ai=0,cl=null,ul=0,qn=[],Gn=0,Bs=null,Vr=1,Ur="";function Vs(r,i){Ni[Ai++]=ul,Ni[Ai++]=cl,cl=r,ul=i}function Ph(r,i,u){qn[Gn++]=Vr,qn[Gn++]=Ur,qn[Gn++]=Bs,Bs=r;var x=Vr;r=Ur;var v=32-In(x)-1;x&=~(1<<v),u+=1;var C=32-In(i)+v;if(30<C){var A=v-v%5;C=(x&(1<<A)-1).toString(32),x>>=A,v-=A,Vr=1<<32-In(i)+v|u<<v|x,Ur=C+r}else Vr=1<<C|u<<v|x,Ur=r}function ed(r){r.return!==null&&(Vs(r,1),Ph(r,1,0))}function td(r){for(;r===cl;)cl=Ni[--Ai],Ni[Ai]=null,ul=Ni[--Ai],Ni[Ai]=null;for(;r===Bs;)Bs=qn[--Gn],qn[Gn]=null,Ur=qn[--Gn],qn[Gn]=null,Vr=qn[--Gn],qn[Gn]=null}var Mn=null,_n=null,Et=!1,lr=null;function Mh(r,i){var u=Xn(5,null,null,0);u.elementType="DELETED",u.stateNode=i,u.return=r,i=r.deletions,i===null?(r.deletions=[u],r.flags|=16):i.push(u)}function _h(r,i){switch(r.tag){case 5:var u=r.type;return i=i.nodeType!==1||u.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,Mn=r,_n=us(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,Mn=r,_n=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(u=Bs!==null?{id:Vr,overflow:Ur}:null,r.memoizedState={dehydrated:i,treeContext:u,retryLane:1073741824},u=Xn(18,null,null,0),u.stateNode=i,u.return=r,r.child=u,Mn=r,_n=null,!0):!1;default:return!1}}function nd(r){return(r.mode&1)!==0&&(r.flags&128)===0}function rd(r){if(Et){var i=_n;if(i){var u=i;if(!_h(r,i)){if(nd(r))throw Error(n(418));i=us(u.nextSibling);var x=Mn;i&&_h(r,i)?Mh(x,u):(r.flags=r.flags&-4097|2,Et=!1,Mn=r)}}else{if(nd(r))throw Error(n(418));r.flags=r.flags&-4097|2,Et=!1,Mn=r}}}function Lh(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Mn=r}function dl(r){if(r!==Mn)return!1;if(!Et)return Lh(r),Et=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!Gu(r.type,r.memoizedProps)),i&&(i=_n)){if(nd(r))throw Fh(),Error(n(418));for(;i;)Mh(r,i),i=us(i.nextSibling)}if(Lh(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(i===0){_n=us(r.nextSibling);break e}i--}else u!=="$"&&u!=="$!"&&u!=="$?"||i++}r=r.nextSibling}_n=null}}else _n=Mn?us(r.stateNode.nextSibling):null;return!0}function Fh(){for(var r=_n;r;)r=us(r.nextSibling)}function Ri(){_n=Mn=null,Et=!1}function sd(r){lr===null?lr=[r]:lr.push(r)}var Zw=M.ReactCurrentBatchConfig;function Lo(r,i,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var x=u.stateNode}if(!x)throw Error(n(147,r));var v=x,C=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===C?i.ref:(i=function(A){var $=v.refs;A===null?delete $[C]:$[C]=A},i._stringRef=C,i)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function fl(r,i){throw r=Object.prototype.toString.call(i),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function Oh(r){var i=r._init;return i(r._payload)}function Dh(r){function i(X,q){if(r){var ee=X.deletions;ee===null?(X.deletions=[q],X.flags|=16):ee.push(q)}}function u(X,q){if(!r)return null;for(;q!==null;)i(X,q),q=q.sibling;return null}function x(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function v(X,q){return X=ws(X,q),X.index=0,X.sibling=null,X}function C(X,q,ee){return X.index=ee,r?(ee=X.alternate,ee!==null?(ee=ee.index,ee<q?(X.flags|=2,q):ee):(X.flags|=2,q)):(X.flags|=1048576,q)}function A(X){return r&&X.alternate===null&&(X.flags|=2),X}function $(X,q,ee,ve){return q===null||q.tag!==6?(q=Kd(ee,X.mode,ve),q.return=X,q):(q=v(q,ee),q.return=X,q)}function U(X,q,ee,ve){var Le=ee.type;return Le===P?me(X,q,ee.props.children,ve,ee.key):q!==null&&(q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Z&&Oh(Le)===q.type)?(ve=v(q,ee.props),ve.ref=Lo(X,q,ee),ve.return=X,ve):(ve=Fl(ee.type,ee.key,ee.props,null,X.mode,ve),ve.ref=Lo(X,q,ee),ve.return=X,ve)}function ne(X,q,ee,ve){return q===null||q.tag!==4||q.stateNode.containerInfo!==ee.containerInfo||q.stateNode.implementation!==ee.implementation?(q=Qd(ee,X.mode,ve),q.return=X,q):(q=v(q,ee.children||[]),q.return=X,q)}function me(X,q,ee,ve,Le){return q===null||q.tag!==7?(q=Ys(ee,X.mode,ve,Le),q.return=X,q):(q=v(q,ee),q.return=X,q)}function he(X,q,ee){if(typeof q=="string"&&q!==""||typeof q=="number")return q=Kd(""+q,X.mode,ee),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return ee=Fl(q.type,q.key,q.props,null,X.mode,ee),ee.ref=Lo(X,null,q),ee.return=X,ee;case R:return q=Qd(q,X.mode,ee),q.return=X,q;case Z:var ve=q._init;return he(X,ve(q._payload),ee)}if(Kt(q)||J(q))return q=Ys(q,X.mode,ee,null),q.return=X,q;fl(X,q)}return null}function pe(X,q,ee,ve){var Le=q!==null?q.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number")return Le!==null?null:$(X,q,""+ee,ve);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case _:return ee.key===Le?U(X,q,ee,ve):null;case R:return ee.key===Le?ne(X,q,ee,ve):null;case Z:return Le=ee._init,pe(X,q,Le(ee._payload),ve)}if(Kt(ee)||J(ee))return Le!==null?null:me(X,q,ee,ve,null);fl(X,ee)}return null}function Ce(X,q,ee,ve,Le){if(typeof ve=="string"&&ve!==""||typeof ve=="number")return X=X.get(ee)||null,$(q,X,""+ve,Le);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case _:return X=X.get(ve.key===null?ee:ve.key)||null,U(q,X,ve,Le);case R:return X=X.get(ve.key===null?ee:ve.key)||null,ne(q,X,ve,Le);case Z:var De=ve._init;return Ce(X,q,ee,De(ve._payload),Le)}if(Kt(ve)||J(ve))return X=X.get(ee)||null,me(q,X,ve,Le,null);fl(q,ve)}return null}function Re(X,q,ee,ve){for(var Le=null,De=null,ze=q,Ue=q=0,Gt=null;ze!==null&&Ue<ee.length;Ue++){ze.index>Ue?(Gt=ze,ze=null):Gt=ze.sibling;var dt=pe(X,ze,ee[Ue],ve);if(dt===null){ze===null&&(ze=Gt);break}r&&ze&&dt.alternate===null&&i(X,ze),q=C(dt,q,Ue),De===null?Le=dt:De.sibling=dt,De=dt,ze=Gt}if(Ue===ee.length)return u(X,ze),Et&&Vs(X,Ue),Le;if(ze===null){for(;Ue<ee.length;Ue++)ze=he(X,ee[Ue],ve),ze!==null&&(q=C(ze,q,Ue),De===null?Le=ze:De.sibling=ze,De=ze);return Et&&Vs(X,Ue),Le}for(ze=x(X,ze);Ue<ee.length;Ue++)Gt=Ce(ze,X,Ue,ee[Ue],ve),Gt!==null&&(r&&Gt.alternate!==null&&ze.delete(Gt.key===null?Ue:Gt.key),q=C(Gt,q,Ue),De===null?Le=Gt:De.sibling=Gt,De=Gt);return r&&ze.forEach(function(ks){return i(X,ks)}),Et&&Vs(X,Ue),Le}function Me(X,q,ee,ve){var Le=J(ee);if(typeof Le!="function")throw Error(n(150));if(ee=Le.call(ee),ee==null)throw Error(n(151));for(var De=Le=null,ze=q,Ue=q=0,Gt=null,dt=ee.next();ze!==null&&!dt.done;Ue++,dt=ee.next()){ze.index>Ue?(Gt=ze,ze=null):Gt=ze.sibling;var ks=pe(X,ze,dt.value,ve);if(ks===null){ze===null&&(ze=Gt);break}r&&ze&&ks.alternate===null&&i(X,ze),q=C(ks,q,Ue),De===null?Le=ks:De.sibling=ks,De=ks,ze=Gt}if(dt.done)return u(X,ze),Et&&Vs(X,Ue),Le;if(ze===null){for(;!dt.done;Ue++,dt=ee.next())dt=he(X,dt.value,ve),dt!==null&&(q=C(dt,q,Ue),De===null?Le=dt:De.sibling=dt,De=dt);return Et&&Vs(X,Ue),Le}for(ze=x(X,ze);!dt.done;Ue++,dt=ee.next())dt=Ce(ze,X,Ue,dt.value,ve),dt!==null&&(r&&dt.alternate!==null&&ze.delete(dt.key===null?Ue:dt.key),q=C(dt,q,Ue),De===null?Le=dt:De.sibling=dt,De=dt);return r&&ze.forEach(function(C8){return i(X,C8)}),Et&&Vs(X,Ue),Le}function _t(X,q,ee,ve){if(typeof ee=="object"&&ee!==null&&ee.type===P&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case _:e:{for(var Le=ee.key,De=q;De!==null;){if(De.key===Le){if(Le=ee.type,Le===P){if(De.tag===7){u(X,De.sibling),q=v(De,ee.props.children),q.return=X,X=q;break e}}else if(De.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Z&&Oh(Le)===De.type){u(X,De.sibling),q=v(De,ee.props),q.ref=Lo(X,De,ee),q.return=X,X=q;break e}u(X,De);break}else i(X,De);De=De.sibling}ee.type===P?(q=Ys(ee.props.children,X.mode,ve,ee.key),q.return=X,X=q):(ve=Fl(ee.type,ee.key,ee.props,null,X.mode,ve),ve.ref=Lo(X,q,ee),ve.return=X,X=ve)}return A(X);case R:e:{for(De=ee.key;q!==null;){if(q.key===De)if(q.tag===4&&q.stateNode.containerInfo===ee.containerInfo&&q.stateNode.implementation===ee.implementation){u(X,q.sibling),q=v(q,ee.children||[]),q.return=X,X=q;break e}else{u(X,q);break}else i(X,q);q=q.sibling}q=Qd(ee,X.mode,ve),q.return=X,X=q}return A(X);case Z:return De=ee._init,_t(X,q,De(ee._payload),ve)}if(Kt(ee))return Re(X,q,ee,ve);if(J(ee))return Me(X,q,ee,ve);fl(X,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,q!==null&&q.tag===6?(u(X,q.sibling),q=v(q,ee),q.return=X,X=q):(u(X,q),q=Kd(ee,X.mode,ve),q.return=X,X=q),A(X)):u(X,q)}return _t}var Ti=Dh(!0),zh=Dh(!1),pl=ds(null),ml=null,Ii=null,id=null;function od(){id=Ii=ml=null}function ad(r){var i=pl.current;Ct(pl),r._currentValue=i}function ld(r,i,u){for(;r!==null;){var x=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,x!==null&&(x.childLanes|=i)):x!==null&&(x.childLanes&i)!==i&&(x.childLanes|=i),r===u)break;r=r.return}}function Pi(r,i){ml=r,id=Ii=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(vn=!0),r.firstContext=null)}function Kn(r){var i=r._currentValue;if(id!==r)if(r={context:r,memoizedValue:i,next:null},Ii===null){if(ml===null)throw Error(n(308));Ii=r,ml.dependencies={lanes:0,firstContext:r}}else Ii=Ii.next=r;return i}var Us=null;function cd(r){Us===null?Us=[r]:Us.push(r)}function $h(r,i,u,x){var v=i.interleaved;return v===null?(u.next=u,cd(i)):(u.next=v.next,v.next=u),i.interleaved=u,Zr(r,x)}function Zr(r,i){r.lanes|=i;var u=r.alternate;for(u!==null&&(u.lanes|=i),u=r,r=r.return;r!==null;)r.childLanes|=i,u=r.alternate,u!==null&&(u.childLanes|=i),u=r,r=r.return;return u.tag===3?u.stateNode:null}var ms=!1;function ud(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hh(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Wr(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function hs(r,i,u){var x=r.updateQueue;if(x===null)return null;if(x=x.shared,(lt&2)!==0){var v=x.pending;return v===null?i.next=i:(i.next=v.next,v.next=i),x.pending=i,Zr(r,u)}return v=x.interleaved,v===null?(i.next=i,cd(x)):(i.next=v.next,v.next=i),x.interleaved=i,Zr(r,u)}function hl(r,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194240)!==0)){var x=i.lanes;x&=r.pendingLanes,u|=x,i.lanes=u,xo(r,u)}}function Bh(r,i){var u=r.updateQueue,x=r.alternate;if(x!==null&&(x=x.updateQueue,u===x)){var v=null,C=null;if(u=u.firstBaseUpdate,u!==null){do{var A={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};C===null?v=C=A:C=C.next=A,u=u.next}while(u!==null);C===null?v=C=i:C=C.next=i}else v=C=i;u={baseState:x.baseState,firstBaseUpdate:v,lastBaseUpdate:C,shared:x.shared,effects:x.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=i:r.next=i,u.lastBaseUpdate=i}function gl(r,i,u,x){var v=r.updateQueue;ms=!1;var C=v.firstBaseUpdate,A=v.lastBaseUpdate,$=v.shared.pending;if($!==null){v.shared.pending=null;var U=$,ne=U.next;U.next=null,A===null?C=ne:A.next=ne,A=U;var me=r.alternate;me!==null&&(me=me.updateQueue,$=me.lastBaseUpdate,$!==A&&($===null?me.firstBaseUpdate=ne:$.next=ne,me.lastBaseUpdate=U))}if(C!==null){var he=v.baseState;A=0,me=ne=U=null,$=C;do{var pe=$.lane,Ce=$.eventTime;if((x&pe)===pe){me!==null&&(me=me.next={eventTime:Ce,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var Re=r,Me=$;switch(pe=i,Ce=u,Me.tag){case 1:if(Re=Me.payload,typeof Re=="function"){he=Re.call(Ce,he,pe);break e}he=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=Me.payload,pe=typeof Re=="function"?Re.call(Ce,he,pe):Re,pe==null)break e;he=T({},he,pe);break e;case 2:ms=!0}}$.callback!==null&&$.lane!==0&&(r.flags|=64,pe=v.effects,pe===null?v.effects=[$]:pe.push($))}else Ce={eventTime:Ce,lane:pe,tag:$.tag,payload:$.payload,callback:$.callback,next:null},me===null?(ne=me=Ce,U=he):me=me.next=Ce,A|=pe;if($=$.next,$===null){if($=v.shared.pending,$===null)break;pe=$,$=pe.next,pe.next=null,v.lastBaseUpdate=pe,v.shared.pending=null}}while(!0);if(me===null&&(U=he),v.baseState=U,v.firstBaseUpdate=ne,v.lastBaseUpdate=me,i=v.shared.interleaved,i!==null){v=i;do A|=v.lane,v=v.next;while(v!==i)}else C===null&&(v.shared.lanes=0);qs|=A,r.lanes=A,r.memoizedState=he}}function Vh(r,i,u){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var x=r[i],v=x.callback;if(v!==null){if(x.callback=null,x=u,typeof v!="function")throw Error(n(191,v));v.call(x)}}}var Fo={},br=ds(Fo),Oo=ds(Fo),Do=ds(Fo);function Zs(r){if(r===Fo)throw Error(n(174));return r}function dd(r,i){switch(wt(Do,i),wt(Oo,r),wt(br,Fo),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:xe(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=xe(i,r)}Ct(br),wt(br,i)}function Mi(){Ct(br),Ct(Oo),Ct(Do)}function Uh(r){Zs(Do.current);var i=Zs(br.current),u=xe(i,r.type);i!==u&&(wt(Oo,r),wt(br,u))}function fd(r){Oo.current===r&&(Ct(br),Ct(Oo))}var Tt=ds(0);function xl(r){for(var i=r;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var pd=[];function md(){for(var r=0;r<pd.length;r++)pd[r]._workInProgressVersionPrimary=null;pd.length=0}var yl=M.ReactCurrentDispatcher,hd=M.ReactCurrentBatchConfig,Ws=0,It=null,Bt=null,Wt=null,vl=!1,zo=!1,$o=0,Ww=0;function sn(){throw Error(n(321))}function gd(r,i){if(i===null)return!1;for(var u=0;u<i.length&&u<r.length;u++)if(!ar(r[u],i[u]))return!1;return!0}function xd(r,i,u,x,v,C){if(Ws=C,It=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,yl.current=r===null||r.memoizedState===null?Qw:Yw,r=u(x,v),zo){C=0;do{if(zo=!1,$o=0,25<=C)throw Error(n(301));C+=1,Wt=Bt=null,i.updateQueue=null,yl.current=Xw,r=u(x,v)}while(zo)}if(yl.current=kl,i=Bt!==null&&Bt.next!==null,Ws=0,Wt=Bt=It=null,vl=!1,i)throw Error(n(300));return r}function yd(){var r=$o!==0;return $o=0,r}function wr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?It.memoizedState=Wt=r:Wt=Wt.next=r,Wt}function Qn(){if(Bt===null){var r=It.alternate;r=r!==null?r.memoizedState:null}else r=Bt.next;var i=Wt===null?It.memoizedState:Wt.next;if(i!==null)Wt=i,Bt=r;else{if(r===null)throw Error(n(310));Bt=r,r={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},Wt===null?It.memoizedState=Wt=r:Wt=Wt.next=r}return Wt}function Ho(r,i){return typeof i=="function"?i(r):i}function vd(r){var i=Qn(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var x=Bt,v=x.baseQueue,C=u.pending;if(C!==null){if(v!==null){var A=v.next;v.next=C.next,C.next=A}x.baseQueue=v=C,u.pending=null}if(v!==null){C=v.next,x=x.baseState;var $=A=null,U=null,ne=C;do{var me=ne.lane;if((Ws&me)===me)U!==null&&(U=U.next={lane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),x=ne.hasEagerState?ne.eagerState:r(x,ne.action);else{var he={lane:me,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null};U===null?($=U=he,A=x):U=U.next=he,It.lanes|=me,qs|=me}ne=ne.next}while(ne!==null&&ne!==C);U===null?A=x:U.next=$,ar(x,i.memoizedState)||(vn=!0),i.memoizedState=x,i.baseState=A,i.baseQueue=U,u.lastRenderedState=x}if(r=u.interleaved,r!==null){v=r;do C=v.lane,It.lanes|=C,qs|=C,v=v.next;while(v!==r)}else v===null&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function bd(r){var i=Qn(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var x=u.dispatch,v=u.pending,C=i.memoizedState;if(v!==null){u.pending=null;var A=v=v.next;do C=r(C,A.action),A=A.next;while(A!==v);ar(C,i.memoizedState)||(vn=!0),i.memoizedState=C,i.baseQueue===null&&(i.baseState=C),u.lastRenderedState=C}return[C,x]}function Zh(){}function Wh(r,i){var u=It,x=Qn(),v=i(),C=!ar(x.memoizedState,v);if(C&&(x.memoizedState=v,vn=!0),x=x.queue,wd(Kh.bind(null,u,x,r),[r]),x.getSnapshot!==i||C||Wt!==null&&Wt.memoizedState.tag&1){if(u.flags|=2048,Bo(9,Gh.bind(null,u,x,v,i),void 0,null),qt===null)throw Error(n(349));(Ws&30)!==0||qh(u,i,v)}return v}function qh(r,i,u){r.flags|=16384,r={getSnapshot:i,value:u},i=It.updateQueue,i===null?(i={lastEffect:null,stores:null},It.updateQueue=i,i.stores=[r]):(u=i.stores,u===null?i.stores=[r]:u.push(r))}function Gh(r,i,u,x){i.value=u,i.getSnapshot=x,Qh(i)&&Yh(r)}function Kh(r,i,u){return u(function(){Qh(i)&&Yh(r)})}function Qh(r){var i=r.getSnapshot;r=r.value;try{var u=i();return!ar(r,u)}catch{return!0}}function Yh(r){var i=Zr(r,1);i!==null&&fr(i,r,1,-1)}function Xh(r){var i=wr();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:r},i.queue=r,r=r.dispatch=Kw.bind(null,It,r),[i.memoizedState,r]}function Bo(r,i,u,x){return r={tag:r,create:i,destroy:u,deps:x,next:null},i=It.updateQueue,i===null?(i={lastEffect:null,stores:null},It.updateQueue=i,i.lastEffect=r.next=r):(u=i.lastEffect,u===null?i.lastEffect=r.next=r:(x=u.next,u.next=r,r.next=x,i.lastEffect=r)),r}function Jh(){return Qn().memoizedState}function bl(r,i,u,x){var v=wr();It.flags|=r,v.memoizedState=Bo(1|i,u,void 0,x===void 0?null:x)}function wl(r,i,u,x){var v=Qn();x=x===void 0?null:x;var C=void 0;if(Bt!==null){var A=Bt.memoizedState;if(C=A.destroy,x!==null&&gd(x,A.deps)){v.memoizedState=Bo(i,u,C,x);return}}It.flags|=r,v.memoizedState=Bo(1|i,u,C,x)}function e0(r,i){return bl(8390656,8,r,i)}function wd(r,i){return wl(2048,8,r,i)}function t0(r,i){return wl(4,2,r,i)}function n0(r,i){return wl(4,4,r,i)}function r0(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function s0(r,i,u){return u=u!=null?u.concat([r]):null,wl(4,4,r0.bind(null,i,r),u)}function kd(){}function i0(r,i){var u=Qn();i=i===void 0?null:i;var x=u.memoizedState;return x!==null&&i!==null&&gd(i,x[1])?x[0]:(u.memoizedState=[r,i],r)}function o0(r,i){var u=Qn();i=i===void 0?null:i;var x=u.memoizedState;return x!==null&&i!==null&&gd(i,x[1])?x[0]:(r=r(),u.memoizedState=[r,i],r)}function a0(r,i,u){return(Ws&21)===0?(r.baseState&&(r.baseState=!1,vn=!0),r.memoizedState=u):(ar(u,i)||(u=Zn(),It.lanes|=u,qs|=u,r.baseState=!0),i)}function qw(r,i){var u=ut;ut=u!==0&&4>u?u:4,r(!0);var x=hd.transition;hd.transition={};try{r(!1),i()}finally{ut=u,hd.transition=x}}function l0(){return Qn().memoizedState}function Gw(r,i,u){var x=vs(r);if(u={lane:x,action:u,hasEagerState:!1,eagerState:null,next:null},c0(r))u0(i,u);else if(u=$h(r,i,u,x),u!==null){var v=fn();fr(u,r,x,v),d0(u,i,x)}}function Kw(r,i,u){var x=vs(r),v={lane:x,action:u,hasEagerState:!1,eagerState:null,next:null};if(c0(r))u0(i,v);else{var C=r.alternate;if(r.lanes===0&&(C===null||C.lanes===0)&&(C=i.lastRenderedReducer,C!==null))try{var A=i.lastRenderedState,$=C(A,u);if(v.hasEagerState=!0,v.eagerState=$,ar($,A)){var U=i.interleaved;U===null?(v.next=v,cd(i)):(v.next=U.next,U.next=v),i.interleaved=v;return}}catch{}u=$h(r,i,v,x),u!==null&&(v=fn(),fr(u,r,x,v),d0(u,i,x))}}function c0(r){var i=r.alternate;return r===It||i!==null&&i===It}function u0(r,i){zo=vl=!0;var u=r.pending;u===null?i.next=i:(i.next=u.next,u.next=i),r.pending=i}function d0(r,i,u){if((u&4194240)!==0){var x=i.lanes;x&=r.pendingLanes,u|=x,i.lanes=u,xo(r,u)}}var kl={readContext:Kn,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},Qw={readContext:Kn,useCallback:function(r,i){return wr().memoizedState=[r,i===void 0?null:i],r},useContext:Kn,useEffect:e0,useImperativeHandle:function(r,i,u){return u=u!=null?u.concat([r]):null,bl(4194308,4,r0.bind(null,i,r),u)},useLayoutEffect:function(r,i){return bl(4194308,4,r,i)},useInsertionEffect:function(r,i){return bl(4,2,r,i)},useMemo:function(r,i){var u=wr();return i=i===void 0?null:i,r=r(),u.memoizedState=[r,i],r},useReducer:function(r,i,u){var x=wr();return i=u!==void 0?u(i):i,x.memoizedState=x.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},x.queue=r,r=r.dispatch=Gw.bind(null,It,r),[x.memoizedState,r]},useRef:function(r){var i=wr();return r={current:r},i.memoizedState=r},useState:Xh,useDebugValue:kd,useDeferredValue:function(r){return wr().memoizedState=r},useTransition:function(){var r=Xh(!1),i=r[0];return r=qw.bind(null,r[1]),wr().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,u){var x=It,v=wr();if(Et){if(u===void 0)throw Error(n(407));u=u()}else{if(u=i(),qt===null)throw Error(n(349));(Ws&30)!==0||qh(x,i,u)}v.memoizedState=u;var C={value:u,getSnapshot:i};return v.queue=C,e0(Kh.bind(null,x,C,r),[r]),x.flags|=2048,Bo(9,Gh.bind(null,x,C,u,i),void 0,null),u},useId:function(){var r=wr(),i=qt.identifierPrefix;if(Et){var u=Ur,x=Vr;u=(x&~(1<<32-In(x)-1)).toString(32)+u,i=":"+i+"R"+u,u=$o++,0<u&&(i+="H"+u.toString(32)),i+=":"}else u=Ww++,i=":"+i+"r"+u.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},Yw={readContext:Kn,useCallback:i0,useContext:Kn,useEffect:wd,useImperativeHandle:s0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:vd,useRef:Jh,useState:function(){return vd(Ho)},useDebugValue:kd,useDeferredValue:function(r){var i=Qn();return a0(i,Bt.memoizedState,r)},useTransition:function(){var r=vd(Ho)[0],i=Qn().memoizedState;return[r,i]},useMutableSource:Zh,useSyncExternalStore:Wh,useId:l0,unstable_isNewReconciler:!1},Xw={readContext:Kn,useCallback:i0,useContext:Kn,useEffect:wd,useImperativeHandle:s0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:bd,useRef:Jh,useState:function(){return bd(Ho)},useDebugValue:kd,useDeferredValue:function(r){var i=Qn();return Bt===null?i.memoizedState=r:a0(i,Bt.memoizedState,r)},useTransition:function(){var r=bd(Ho)[0],i=Qn().memoizedState;return[r,i]},useMutableSource:Zh,useSyncExternalStore:Wh,useId:l0,unstable_isNewReconciler:!1};function cr(r,i){if(r&&r.defaultProps){i=T({},i),r=r.defaultProps;for(var u in r)i[u]===void 0&&(i[u]=r[u]);return i}return i}function Sd(r,i,u,x){i=r.memoizedState,u=u(x,i),u=u==null?i:T({},i,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Sl={isMounted:function(r){return(r=r._reactInternals)?zr(r)===r:!1},enqueueSetState:function(r,i,u){r=r._reactInternals;var x=fn(),v=vs(r),C=Wr(x,v);C.payload=i,u!=null&&(C.callback=u),i=hs(r,C,v),i!==null&&(fr(i,r,v,x),hl(i,r,v))},enqueueReplaceState:function(r,i,u){r=r._reactInternals;var x=fn(),v=vs(r),C=Wr(x,v);C.tag=1,C.payload=i,u!=null&&(C.callback=u),i=hs(r,C,v),i!==null&&(fr(i,r,v,x),hl(i,r,v))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var u=fn(),x=vs(r),v=Wr(u,x);v.tag=2,i!=null&&(v.callback=i),i=hs(r,v,x),i!==null&&(fr(i,r,x,u),hl(i,r,x))}};function f0(r,i,u,x,v,C,A){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(x,C,A):i.prototype&&i.prototype.isPureReactComponent?!Ao(u,x)||!Ao(v,C):!0}function p0(r,i,u){var x=!1,v=fs,C=i.contextType;return typeof C=="object"&&C!==null?C=Kn(C):(v=yn(i)?Hs:rn.current,x=i.contextTypes,C=(x=x!=null)?Ei(r,v):fs),i=new i(u,C),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Sl,r.stateNode=i,i._reactInternals=r,x&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=v,r.__reactInternalMemoizedMaskedChildContext=C),i}function m0(r,i,u,x){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,x),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,x),i.state!==r&&Sl.enqueueReplaceState(i,i.state,null)}function Cd(r,i,u,x){var v=r.stateNode;v.props=u,v.state=r.memoizedState,v.refs={},ud(r);var C=i.contextType;typeof C=="object"&&C!==null?v.context=Kn(C):(C=yn(i)?Hs:rn.current,v.context=Ei(r,C)),v.state=r.memoizedState,C=i.getDerivedStateFromProps,typeof C=="function"&&(Sd(r,i,C,u),v.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(i=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),i!==v.state&&Sl.enqueueReplaceState(v,v.state,null),gl(r,u,v,x),v.state=r.memoizedState),typeof v.componentDidMount=="function"&&(r.flags|=4194308)}function _i(r,i){try{var u="",x=i;do u+=se(x),x=x.return;while(x);var v=u}catch(C){v=`
|
|
7
|
+
Error generating stack: `+C.message+`
|
|
8
|
+
`+C.stack}return{value:r,source:i,stack:v,digest:null}}function jd(r,i,u){return{value:r,source:null,stack:u??null,digest:i??null}}function Ed(r,i){try{console.error(i.value)}catch(u){setTimeout(function(){throw u})}}var Jw=typeof WeakMap=="function"?WeakMap:Map;function h0(r,i,u){u=Wr(-1,u),u.tag=3,u.payload={element:null};var x=i.value;return u.callback=function(){Tl||(Tl=!0,Hd=x),Ed(r,i)},u}function g0(r,i,u){u=Wr(-1,u),u.tag=3;var x=r.type.getDerivedStateFromError;if(typeof x=="function"){var v=i.value;u.payload=function(){return x(v)},u.callback=function(){Ed(r,i)}}var C=r.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(u.callback=function(){Ed(r,i),typeof x!="function"&&(xs===null?xs=new Set([this]):xs.add(this));var A=i.stack;this.componentDidCatch(i.value,{componentStack:A!==null?A:""})}),u}function x0(r,i,u){var x=r.pingCache;if(x===null){x=r.pingCache=new Jw;var v=new Set;x.set(i,v)}else v=x.get(i),v===void 0&&(v=new Set,x.set(i,v));v.has(u)||(v.add(u),r=p8.bind(null,r,i,u),i.then(r,r))}function y0(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function v0(r,i,u,x,v){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(i=Wr(-1,1),i.tag=2,hs(u,i,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=v,r)}var e8=M.ReactCurrentOwner,vn=!1;function dn(r,i,u,x){i.child=r===null?zh(i,null,u,x):Ti(i,r.child,u,x)}function b0(r,i,u,x,v){u=u.render;var C=i.ref;return Pi(i,v),x=xd(r,i,u,x,C,v),u=yd(),r!==null&&!vn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~v,qr(r,i,v)):(Et&&u&&ed(i),i.flags|=1,dn(r,i,x,v),i.child)}function w0(r,i,u,x,v){if(r===null){var C=u.type;return typeof C=="function"&&!Gd(C)&&C.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(i.tag=15,i.type=C,k0(r,i,C,x,v)):(r=Fl(u.type,null,x,i,i.mode,v),r.ref=i.ref,r.return=i,i.child=r)}if(C=r.child,(r.lanes&v)===0){var A=C.memoizedProps;if(u=u.compare,u=u!==null?u:Ao,u(A,x)&&r.ref===i.ref)return qr(r,i,v)}return i.flags|=1,r=ws(C,x),r.ref=i.ref,r.return=i,i.child=r}function k0(r,i,u,x,v){if(r!==null){var C=r.memoizedProps;if(Ao(C,x)&&r.ref===i.ref)if(vn=!1,i.pendingProps=x=C,(r.lanes&v)!==0)(r.flags&131072)!==0&&(vn=!0);else return i.lanes=r.lanes,qr(r,i,v)}return Nd(r,i,u,x,v)}function S0(r,i,u){var x=i.pendingProps,v=x.children,C=r!==null?r.memoizedState:null;if(x.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},wt(Fi,Ln),Ln|=u;else{if((u&1073741824)===0)return r=C!==null?C.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,wt(Fi,Ln),Ln|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},x=C!==null?C.baseLanes:u,wt(Fi,Ln),Ln|=x}else C!==null?(x=C.baseLanes|u,i.memoizedState=null):x=u,wt(Fi,Ln),Ln|=x;return dn(r,i,v,u),i.child}function C0(r,i){var u=i.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function Nd(r,i,u,x,v){var C=yn(u)?Hs:rn.current;return C=Ei(i,C),Pi(i,v),u=xd(r,i,u,x,C,v),x=yd(),r!==null&&!vn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~v,qr(r,i,v)):(Et&&x&&ed(i),i.flags|=1,dn(r,i,u,v),i.child)}function j0(r,i,u,x,v){if(yn(u)){var C=!0;al(i)}else C=!1;if(Pi(i,v),i.stateNode===null)jl(r,i),p0(i,u,x),Cd(i,u,x,v),x=!0;else if(r===null){var A=i.stateNode,$=i.memoizedProps;A.props=$;var U=A.context,ne=u.contextType;typeof ne=="object"&&ne!==null?ne=Kn(ne):(ne=yn(u)?Hs:rn.current,ne=Ei(i,ne));var me=u.getDerivedStateFromProps,he=typeof me=="function"||typeof A.getSnapshotBeforeUpdate=="function";he||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||($!==x||U!==ne)&&m0(i,A,x,ne),ms=!1;var pe=i.memoizedState;A.state=pe,gl(i,x,A,v),U=i.memoizedState,$!==x||pe!==U||xn.current||ms?(typeof me=="function"&&(Sd(i,u,me,x),U=i.memoizedState),($=ms||f0(i,u,$,x,pe,U,ne))?(he||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(i.flags|=4194308)):(typeof A.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=x,i.memoizedState=U),A.props=x,A.state=U,A.context=ne,x=$):(typeof A.componentDidMount=="function"&&(i.flags|=4194308),x=!1)}else{A=i.stateNode,Hh(r,i),$=i.memoizedProps,ne=i.type===i.elementType?$:cr(i.type,$),A.props=ne,he=i.pendingProps,pe=A.context,U=u.contextType,typeof U=="object"&&U!==null?U=Kn(U):(U=yn(u)?Hs:rn.current,U=Ei(i,U));var Ce=u.getDerivedStateFromProps;(me=typeof Ce=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||($!==he||pe!==U)&&m0(i,A,x,U),ms=!1,pe=i.memoizedState,A.state=pe,gl(i,x,A,v);var Re=i.memoizedState;$!==he||pe!==Re||xn.current||ms?(typeof Ce=="function"&&(Sd(i,u,Ce,x),Re=i.memoizedState),(ne=ms||f0(i,u,ne,x,pe,Re,U)||!1)?(me||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(x,Re,U),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(x,Re,U)),typeof A.componentDidUpdate=="function"&&(i.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof A.componentDidUpdate!="function"||$===r.memoizedProps&&pe===r.memoizedState||(i.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||$===r.memoizedProps&&pe===r.memoizedState||(i.flags|=1024),i.memoizedProps=x,i.memoizedState=Re),A.props=x,A.state=Re,A.context=U,x=ne):(typeof A.componentDidUpdate!="function"||$===r.memoizedProps&&pe===r.memoizedState||(i.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||$===r.memoizedProps&&pe===r.memoizedState||(i.flags|=1024),x=!1)}return Ad(r,i,u,x,C,v)}function Ad(r,i,u,x,v,C){C0(r,i);var A=(i.flags&128)!==0;if(!x&&!A)return v&&Th(i,u,!1),qr(r,i,C);x=i.stateNode,e8.current=i;var $=A&&typeof u.getDerivedStateFromError!="function"?null:x.render();return i.flags|=1,r!==null&&A?(i.child=Ti(i,r.child,null,C),i.child=Ti(i,null,$,C)):dn(r,i,$,C),i.memoizedState=x.state,v&&Th(i,u,!0),i.child}function E0(r){var i=r.stateNode;i.pendingContext?Ah(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Ah(r,i.context,!1),dd(r,i.containerInfo)}function N0(r,i,u,x,v){return Ri(),sd(v),i.flags|=256,dn(r,i,u,x),i.child}var Rd={dehydrated:null,treeContext:null,retryLane:0};function Td(r){return{baseLanes:r,cachePool:null,transitions:null}}function A0(r,i,u){var x=i.pendingProps,v=Tt.current,C=!1,A=(i.flags&128)!==0,$;if(($=A)||($=r!==null&&r.memoizedState===null?!1:(v&2)!==0),$?(C=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(v|=1),wt(Tt,v&1),r===null)return rd(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(A=x.children,r=x.fallback,C?(x=i.mode,C=i.child,A={mode:"hidden",children:A},(x&1)===0&&C!==null?(C.childLanes=0,C.pendingProps=A):C=Ol(A,x,0,null),r=Ys(r,x,u,null),C.return=i,r.return=i,C.sibling=r,i.child=C,i.child.memoizedState=Td(u),i.memoizedState=Rd,r):Id(i,A));if(v=r.memoizedState,v!==null&&($=v.dehydrated,$!==null))return t8(r,i,A,x,$,v,u);if(C){C=x.fallback,A=i.mode,v=r.child,$=v.sibling;var U={mode:"hidden",children:x.children};return(A&1)===0&&i.child!==v?(x=i.child,x.childLanes=0,x.pendingProps=U,i.deletions=null):(x=ws(v,U),x.subtreeFlags=v.subtreeFlags&14680064),$!==null?C=ws($,C):(C=Ys(C,A,u,null),C.flags|=2),C.return=i,x.return=i,x.sibling=C,i.child=x,x=C,C=i.child,A=r.child.memoizedState,A=A===null?Td(u):{baseLanes:A.baseLanes|u,cachePool:null,transitions:A.transitions},C.memoizedState=A,C.childLanes=r.childLanes&~u,i.memoizedState=Rd,x}return C=r.child,r=C.sibling,x=ws(C,{mode:"visible",children:x.children}),(i.mode&1)===0&&(x.lanes=u),x.return=i,x.sibling=null,r!==null&&(u=i.deletions,u===null?(i.deletions=[r],i.flags|=16):u.push(r)),i.child=x,i.memoizedState=null,x}function Id(r,i){return i=Ol({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function Cl(r,i,u,x){return x!==null&&sd(x),Ti(i,r.child,null,u),r=Id(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function t8(r,i,u,x,v,C,A){if(u)return i.flags&256?(i.flags&=-257,x=jd(Error(n(422))),Cl(r,i,A,x)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(C=x.fallback,v=i.mode,x=Ol({mode:"visible",children:x.children},v,0,null),C=Ys(C,v,A,null),C.flags|=2,x.return=i,C.return=i,x.sibling=C,i.child=x,(i.mode&1)!==0&&Ti(i,r.child,null,A),i.child.memoizedState=Td(A),i.memoizedState=Rd,C);if((i.mode&1)===0)return Cl(r,i,A,null);if(v.data==="$!"){if(x=v.nextSibling&&v.nextSibling.dataset,x)var $=x.dgst;return x=$,C=Error(n(419)),x=jd(C,x,void 0),Cl(r,i,A,x)}if($=(A&r.childLanes)!==0,vn||$){if(x=qt,x!==null){switch(A&-A){case 4:v=2;break;case 16:v=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(x.suspendedLanes|A))!==0?0:v,v!==0&&v!==C.retryLane&&(C.retryLane=v,Zr(r,v),fr(x,r,v,-1))}return qd(),x=jd(Error(n(421))),Cl(r,i,A,x)}return v.data==="$?"?(i.flags|=128,i.child=r.child,i=m8.bind(null,r),v._reactRetry=i,null):(r=C.treeContext,_n=us(v.nextSibling),Mn=i,Et=!0,lr=null,r!==null&&(qn[Gn++]=Vr,qn[Gn++]=Ur,qn[Gn++]=Bs,Vr=r.id,Ur=r.overflow,Bs=i),i=Id(i,x.children),i.flags|=4096,i)}function R0(r,i,u){r.lanes|=i;var x=r.alternate;x!==null&&(x.lanes|=i),ld(r.return,i,u)}function Pd(r,i,u,x,v){var C=r.memoizedState;C===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:x,tail:u,tailMode:v}:(C.isBackwards=i,C.rendering=null,C.renderingStartTime=0,C.last=x,C.tail=u,C.tailMode=v)}function T0(r,i,u){var x=i.pendingProps,v=x.revealOrder,C=x.tail;if(dn(r,i,x.children,u),x=Tt.current,(x&2)!==0)x=x&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&R0(r,u,i);else if(r.tag===19)R0(r,u,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}x&=1}if(wt(Tt,x),(i.mode&1)===0)i.memoizedState=null;else switch(v){case"forwards":for(u=i.child,v=null;u!==null;)r=u.alternate,r!==null&&xl(r)===null&&(v=u),u=u.sibling;u=v,u===null?(v=i.child,i.child=null):(v=u.sibling,u.sibling=null),Pd(i,!1,v,u,C);break;case"backwards":for(u=null,v=i.child,i.child=null;v!==null;){if(r=v.alternate,r!==null&&xl(r)===null){i.child=v;break}r=v.sibling,v.sibling=u,u=v,v=r}Pd(i,!0,u,null,C);break;case"together":Pd(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function jl(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function qr(r,i,u){if(r!==null&&(i.dependencies=r.dependencies),qs|=i.lanes,(u&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(n(153));if(i.child!==null){for(r=i.child,u=ws(r,r.pendingProps),i.child=u,u.return=i;r.sibling!==null;)r=r.sibling,u=u.sibling=ws(r,r.pendingProps),u.return=i;u.sibling=null}return i.child}function n8(r,i,u){switch(i.tag){case 3:E0(i),Ri();break;case 5:Uh(i);break;case 1:yn(i.type)&&al(i);break;case 4:dd(i,i.stateNode.containerInfo);break;case 10:var x=i.type._context,v=i.memoizedProps.value;wt(pl,x._currentValue),x._currentValue=v;break;case 13:if(x=i.memoizedState,x!==null)return x.dehydrated!==null?(wt(Tt,Tt.current&1),i.flags|=128,null):(u&i.child.childLanes)!==0?A0(r,i,u):(wt(Tt,Tt.current&1),r=qr(r,i,u),r!==null?r.sibling:null);wt(Tt,Tt.current&1);break;case 19:if(x=(u&i.childLanes)!==0,(r.flags&128)!==0){if(x)return T0(r,i,u);i.flags|=128}if(v=i.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),wt(Tt,Tt.current),x)break;return null;case 22:case 23:return i.lanes=0,S0(r,i,u)}return qr(r,i,u)}var I0,Md,P0,M0;I0=function(r,i){for(var u=i.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Md=function(){},P0=function(r,i,u,x){var v=r.memoizedProps;if(v!==x){r=i.stateNode,Zs(br.current);var C=null;switch(u){case"input":v=Ze(r,v),x=Ze(r,x),C=[];break;case"select":v=T({},v,{value:void 0}),x=T({},x,{value:void 0}),C=[];break;case"textarea":v=nn(r,v),x=nn(r,x),C=[];break;default:typeof v.onClick!="function"&&typeof x.onClick=="function"&&(r.onclick=sl)}ht(u,x);var A;u=null;for(ne in v)if(!x.hasOwnProperty(ne)&&v.hasOwnProperty(ne)&&v[ne]!=null)if(ne==="style"){var $=v[ne];for(A in $)$.hasOwnProperty(A)&&(u||(u={}),u[A]="")}else ne!=="dangerouslySetInnerHTML"&&ne!=="children"&&ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(o.hasOwnProperty(ne)?C||(C=[]):(C=C||[]).push(ne,null));for(ne in x){var U=x[ne];if($=v?.[ne],x.hasOwnProperty(ne)&&U!==$&&(U!=null||$!=null))if(ne==="style")if($){for(A in $)!$.hasOwnProperty(A)||U&&U.hasOwnProperty(A)||(u||(u={}),u[A]="");for(A in U)U.hasOwnProperty(A)&&$[A]!==U[A]&&(u||(u={}),u[A]=U[A])}else u||(C||(C=[]),C.push(ne,u)),u=U;else ne==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,$=$?$.__html:void 0,U!=null&&$!==U&&(C=C||[]).push(ne,U)):ne==="children"?typeof U!="string"&&typeof U!="number"||(C=C||[]).push(ne,""+U):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&(o.hasOwnProperty(ne)?(U!=null&&ne==="onScroll"&&St("scroll",r),C||$===U||(C=[])):(C=C||[]).push(ne,U))}u&&(C=C||[]).push("style",u);var ne=C;(i.updateQueue=ne)&&(i.flags|=4)}},M0=function(r,i,u,x){u!==x&&(i.flags|=4)};function Vo(r,i){if(!Et)switch(r.tailMode){case"hidden":i=r.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var x=null;u!==null;)u.alternate!==null&&(x=u),u=u.sibling;x===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:x.sibling=null}}function on(r){var i=r.alternate!==null&&r.alternate.child===r.child,u=0,x=0;if(i)for(var v=r.child;v!==null;)u|=v.lanes|v.childLanes,x|=v.subtreeFlags&14680064,x|=v.flags&14680064,v.return=r,v=v.sibling;else for(v=r.child;v!==null;)u|=v.lanes|v.childLanes,x|=v.subtreeFlags,x|=v.flags,v.return=r,v=v.sibling;return r.subtreeFlags|=x,r.childLanes=u,i}function r8(r,i,u){var x=i.pendingProps;switch(td(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(i),null;case 1:return yn(i.type)&&ol(),on(i),null;case 3:return x=i.stateNode,Mi(),Ct(xn),Ct(rn),md(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(r===null||r.child===null)&&(dl(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,lr!==null&&(Ud(lr),lr=null))),Md(r,i),on(i),null;case 5:fd(i);var v=Zs(Do.current);if(u=i.type,r!==null&&i.stateNode!=null)P0(r,i,u,x,v),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!x){if(i.stateNode===null)throw Error(n(166));return on(i),null}if(r=Zs(br.current),dl(i)){x=i.stateNode,u=i.type;var C=i.memoizedProps;switch(x[vr]=i,x[Mo]=C,r=(i.mode&1)!==0,u){case"dialog":St("cancel",x),St("close",x);break;case"iframe":case"object":case"embed":St("load",x);break;case"video":case"audio":for(v=0;v<To.length;v++)St(To[v],x);break;case"source":St("error",x);break;case"img":case"image":case"link":St("error",x),St("load",x);break;case"details":St("toggle",x);break;case"input":ct(x,C),St("invalid",x);break;case"select":x._wrapperState={wasMultiple:!!C.multiple},St("invalid",x);break;case"textarea":vt(x,C),St("invalid",x)}ht(u,C),v=null;for(var A in C)if(C.hasOwnProperty(A)){var $=C[A];A==="children"?typeof $=="string"?x.textContent!==$&&(C.suppressHydrationWarning!==!0&&rl(x.textContent,$,r),v=["children",$]):typeof $=="number"&&x.textContent!==""+$&&(C.suppressHydrationWarning!==!0&&rl(x.textContent,$,r),v=["children",""+$]):o.hasOwnProperty(A)&&$!=null&&A==="onScroll"&&St("scroll",x)}switch(u){case"input":ge(x),jt(x,C,!0);break;case"textarea":ge(x),rr(x);break;case"select":case"option":break;default:typeof C.onClick=="function"&&(x.onclick=sl)}x=v,i.updateQueue=x,x!==null&&(i.flags|=4)}else{A=v.nodeType===9?v:v.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=ae(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=A.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof x.is=="string"?r=A.createElement(u,{is:x.is}):(r=A.createElement(u),u==="select"&&(A=r,x.multiple?A.multiple=!0:x.size&&(A.size=x.size))):r=A.createElementNS(r,u),r[vr]=i,r[Mo]=x,I0(r,i,!1,!1),i.stateNode=r;e:{switch(A=Lt(u,x),u){case"dialog":St("cancel",r),St("close",r),v=x;break;case"iframe":case"object":case"embed":St("load",r),v=x;break;case"video":case"audio":for(v=0;v<To.length;v++)St(To[v],r);v=x;break;case"source":St("error",r),v=x;break;case"img":case"image":case"link":St("error",r),St("load",r),v=x;break;case"details":St("toggle",r),v=x;break;case"input":ct(r,x),v=Ze(r,x),St("invalid",r);break;case"option":v=x;break;case"select":r._wrapperState={wasMultiple:!!x.multiple},v=T({},x,{value:void 0}),St("invalid",r);break;case"textarea":vt(r,x),v=nn(r,x),St("invalid",r);break;default:v=x}ht(u,v),$=v;for(C in $)if($.hasOwnProperty(C)){var U=$[C];C==="style"?ot(r,U):C==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&fe(r,U)):C==="children"?typeof U=="string"?(u!=="textarea"||U!=="")&&ke(r,U):typeof U=="number"&&ke(r,""+U):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(o.hasOwnProperty(C)?U!=null&&C==="onScroll"&&St("scroll",r):U!=null&&N(r,C,U,A))}switch(u){case"input":ge(r),jt(r,x,!1);break;case"textarea":ge(r),rr(r);break;case"option":x.value!=null&&r.setAttribute("value",""+oe(x.value));break;case"select":r.multiple=!!x.multiple,C=x.value,C!=null?Qt(r,!!x.multiple,C,!1):x.defaultValue!=null&&Qt(r,!!x.multiple,x.defaultValue,!0);break;default:typeof v.onClick=="function"&&(r.onclick=sl)}switch(u){case"button":case"input":case"select":case"textarea":x=!!x.autoFocus;break e;case"img":x=!0;break e;default:x=!1}}x&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return on(i),null;case 6:if(r&&i.stateNode!=null)M0(r,i,r.memoizedProps,x);else{if(typeof x!="string"&&i.stateNode===null)throw Error(n(166));if(u=Zs(Do.current),Zs(br.current),dl(i)){if(x=i.stateNode,u=i.memoizedProps,x[vr]=i,(C=x.nodeValue!==u)&&(r=Mn,r!==null))switch(r.tag){case 3:rl(x.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&rl(x.nodeValue,u,(r.mode&1)!==0)}C&&(i.flags|=4)}else x=(u.nodeType===9?u:u.ownerDocument).createTextNode(x),x[vr]=i,i.stateNode=x}return on(i),null;case 13:if(Ct(Tt),x=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Et&&_n!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Fh(),Ri(),i.flags|=98560,C=!1;else if(C=dl(i),x!==null&&x.dehydrated!==null){if(r===null){if(!C)throw Error(n(318));if(C=i.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(n(317));C[vr]=i}else Ri(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;on(i),C=!1}else lr!==null&&(Ud(lr),lr=null),C=!0;if(!C)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=u,i):(x=x!==null,x!==(r!==null&&r.memoizedState!==null)&&x&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(Tt.current&1)!==0?Vt===0&&(Vt=3):qd())),i.updateQueue!==null&&(i.flags|=4),on(i),null);case 4:return Mi(),Md(r,i),r===null&&Io(i.stateNode.containerInfo),on(i),null;case 10:return ad(i.type._context),on(i),null;case 17:return yn(i.type)&&ol(),on(i),null;case 19:if(Ct(Tt),C=i.memoizedState,C===null)return on(i),null;if(x=(i.flags&128)!==0,A=C.rendering,A===null)if(x)Vo(C,!1);else{if(Vt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(A=xl(r),A!==null){for(i.flags|=128,Vo(C,!1),x=A.updateQueue,x!==null&&(i.updateQueue=x,i.flags|=4),i.subtreeFlags=0,x=u,u=i.child;u!==null;)C=u,r=x,C.flags&=14680066,A=C.alternate,A===null?(C.childLanes=0,C.lanes=r,C.child=null,C.subtreeFlags=0,C.memoizedProps=null,C.memoizedState=null,C.updateQueue=null,C.dependencies=null,C.stateNode=null):(C.childLanes=A.childLanes,C.lanes=A.lanes,C.child=A.child,C.subtreeFlags=0,C.deletions=null,C.memoizedProps=A.memoizedProps,C.memoizedState=A.memoizedState,C.updateQueue=A.updateQueue,C.type=A.type,r=A.dependencies,C.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return wt(Tt,Tt.current&1|2),i.child}r=r.sibling}C.tail!==null&&Rt()>Oi&&(i.flags|=128,x=!0,Vo(C,!1),i.lanes=4194304)}else{if(!x)if(r=xl(A),r!==null){if(i.flags|=128,x=!0,u=r.updateQueue,u!==null&&(i.updateQueue=u,i.flags|=4),Vo(C,!0),C.tail===null&&C.tailMode==="hidden"&&!A.alternate&&!Et)return on(i),null}else 2*Rt()-C.renderingStartTime>Oi&&u!==1073741824&&(i.flags|=128,x=!0,Vo(C,!1),i.lanes=4194304);C.isBackwards?(A.sibling=i.child,i.child=A):(u=C.last,u!==null?u.sibling=A:i.child=A,C.last=A)}return C.tail!==null?(i=C.tail,C.rendering=i,C.tail=i.sibling,C.renderingStartTime=Rt(),i.sibling=null,u=Tt.current,wt(Tt,x?u&1|2:u&1),i):(on(i),null);case 22:case 23:return Wd(),x=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==x&&(i.flags|=8192),x&&(i.mode&1)!==0?(Ln&1073741824)!==0&&(on(i),i.subtreeFlags&6&&(i.flags|=8192)):on(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function s8(r,i){switch(td(i),i.tag){case 1:return yn(i.type)&&ol(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Mi(),Ct(xn),Ct(rn),md(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return fd(i),null;case 13:if(Ct(Tt),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Ri()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ct(Tt),null;case 4:return Mi(),null;case 10:return ad(i.type._context),null;case 22:case 23:return Wd(),null;case 24:return null;default:return null}}var El=!1,an=!1,i8=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function Li(r,i){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(x){Pt(r,i,x)}else u.current=null}function _d(r,i,u){try{u()}catch(x){Pt(r,i,x)}}var _0=!1;function o8(r,i){if(Wu=Wa,r=fh(),Du(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var x=u.getSelection&&u.getSelection();if(x&&x.rangeCount!==0){u=x.anchorNode;var v=x.anchorOffset,C=x.focusNode;x=x.focusOffset;try{u.nodeType,C.nodeType}catch{u=null;break e}var A=0,$=-1,U=-1,ne=0,me=0,he=r,pe=null;t:for(;;){for(var Ce;he!==u||v!==0&&he.nodeType!==3||($=A+v),he!==C||x!==0&&he.nodeType!==3||(U=A+x),he.nodeType===3&&(A+=he.nodeValue.length),(Ce=he.firstChild)!==null;)pe=he,he=Ce;for(;;){if(he===r)break t;if(pe===u&&++ne===v&&($=A),pe===C&&++me===x&&(U=A),(Ce=he.nextSibling)!==null)break;he=pe,pe=he.parentNode}he=Ce}u=$===-1||U===-1?null:{start:$,end:U}}else u=null}u=u||{start:0,end:0}}else u=null;for(qu={focusedElem:r,selectionRange:u},Wa=!1,Ae=i;Ae!==null;)if(i=Ae,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Ae=r;else for(;Ae!==null;){i=Ae;try{var Re=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(Re!==null){var Me=Re.memoizedProps,_t=Re.memoizedState,X=i.stateNode,q=X.getSnapshotBeforeUpdate(i.elementType===i.type?Me:cr(i.type,Me),_t);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var ee=i.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ve){Pt(i,i.return,ve)}if(r=i.sibling,r!==null){r.return=i.return,Ae=r;break}Ae=i.return}return Re=_0,_0=!1,Re}function Uo(r,i,u){var x=i.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var v=x=x.next;do{if((v.tag&r)===r){var C=v.destroy;v.destroy=void 0,C!==void 0&&_d(i,u,C)}v=v.next}while(v!==x)}}function Nl(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&r)===r){var x=u.create;u.destroy=x()}u=u.next}while(u!==i)}}function Ld(r){var i=r.ref;if(i!==null){var u=r.stateNode;r.tag,r=u,typeof i=="function"?i(r):i.current=r}}function L0(r){var i=r.alternate;i!==null&&(r.alternate=null,L0(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[vr],delete i[Mo],delete i[Yu],delete i[Bw],delete i[Vw])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function F0(r){return r.tag===5||r.tag===3||r.tag===4}function O0(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||F0(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Fd(r,i,u){var x=r.tag;if(x===5||x===6)r=r.stateNode,i?u.nodeType===8?u.parentNode.insertBefore(r,i):u.insertBefore(r,i):(u.nodeType===8?(i=u.parentNode,i.insertBefore(r,u)):(i=u,i.appendChild(r)),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=sl));else if(x!==4&&(r=r.child,r!==null))for(Fd(r,i,u),r=r.sibling;r!==null;)Fd(r,i,u),r=r.sibling}function Od(r,i,u){var x=r.tag;if(x===5||x===6)r=r.stateNode,i?u.insertBefore(r,i):u.appendChild(r);else if(x!==4&&(r=r.child,r!==null))for(Od(r,i,u),r=r.sibling;r!==null;)Od(r,i,u),r=r.sibling}var Yt=null,ur=!1;function gs(r,i,u){for(u=u.child;u!==null;)D0(r,i,u),u=u.sibling}function D0(r,i,u){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(hi,u)}catch{}switch(u.tag){case 5:an||Li(u,i);case 6:var x=Yt,v=ur;Yt=null,gs(r,i,u),Yt=x,ur=v,Yt!==null&&(ur?(r=Yt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):Yt.removeChild(u.stateNode));break;case 18:Yt!==null&&(ur?(r=Yt,u=u.stateNode,r.nodeType===8?Qu(r.parentNode,u):r.nodeType===1&&Qu(r,u),ko(r)):Qu(Yt,u.stateNode));break;case 4:x=Yt,v=ur,Yt=u.stateNode.containerInfo,ur=!0,gs(r,i,u),Yt=x,ur=v;break;case 0:case 11:case 14:case 15:if(!an&&(x=u.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){v=x=x.next;do{var C=v,A=C.destroy;C=C.tag,A!==void 0&&((C&2)!==0||(C&4)!==0)&&_d(u,i,A),v=v.next}while(v!==x)}gs(r,i,u);break;case 1:if(!an&&(Li(u,i),x=u.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=u.memoizedProps,x.state=u.memoizedState,x.componentWillUnmount()}catch($){Pt(u,i,$)}gs(r,i,u);break;case 21:gs(r,i,u);break;case 22:u.mode&1?(an=(x=an)||u.memoizedState!==null,gs(r,i,u),an=x):gs(r,i,u);break;default:gs(r,i,u)}}function z0(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new i8),i.forEach(function(x){var v=h8.bind(null,r,x);u.has(x)||(u.add(x),x.then(v,v))})}}function dr(r,i){var u=i.deletions;if(u!==null)for(var x=0;x<u.length;x++){var v=u[x];try{var C=r,A=i,$=A;e:for(;$!==null;){switch($.tag){case 5:Yt=$.stateNode,ur=!1;break e;case 3:Yt=$.stateNode.containerInfo,ur=!0;break e;case 4:Yt=$.stateNode.containerInfo,ur=!0;break e}$=$.return}if(Yt===null)throw Error(n(160));D0(C,A,v),Yt=null,ur=!1;var U=v.alternate;U!==null&&(U.return=null),v.return=null}catch(ne){Pt(v,i,ne)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)$0(i,r),i=i.sibling}function $0(r,i){var u=r.alternate,x=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(dr(i,r),kr(r),x&4){try{Uo(3,r,r.return),Nl(3,r)}catch(Me){Pt(r,r.return,Me)}try{Uo(5,r,r.return)}catch(Me){Pt(r,r.return,Me)}}break;case 1:dr(i,r),kr(r),x&512&&u!==null&&Li(u,u.return);break;case 5:if(dr(i,r),kr(r),x&512&&u!==null&&Li(u,u.return),r.flags&32){var v=r.stateNode;try{ke(v,"")}catch(Me){Pt(r,r.return,Me)}}if(x&4&&(v=r.stateNode,v!=null)){var C=r.memoizedProps,A=u!==null?u.memoizedProps:C,$=r.type,U=r.updateQueue;if(r.updateQueue=null,U!==null)try{$==="input"&&C.type==="radio"&&C.name!=null&&ft(v,C),Lt($,A);var ne=Lt($,C);for(A=0;A<U.length;A+=2){var me=U[A],he=U[A+1];me==="style"?ot(v,he):me==="dangerouslySetInnerHTML"?fe(v,he):me==="children"?ke(v,he):N(v,me,he,ne)}switch($){case"input":Ye(v,C);break;case"textarea":Bn(v,C);break;case"select":var pe=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!C.multiple;var Ce=C.value;Ce!=null?Qt(v,!!C.multiple,Ce,!1):pe!==!!C.multiple&&(C.defaultValue!=null?Qt(v,!!C.multiple,C.defaultValue,!0):Qt(v,!!C.multiple,C.multiple?[]:"",!1))}v[Mo]=C}catch(Me){Pt(r,r.return,Me)}}break;case 6:if(dr(i,r),kr(r),x&4){if(r.stateNode===null)throw Error(n(162));v=r.stateNode,C=r.memoizedProps;try{v.nodeValue=C}catch(Me){Pt(r,r.return,Me)}}break;case 3:if(dr(i,r),kr(r),x&4&&u!==null&&u.memoizedState.isDehydrated)try{ko(i.containerInfo)}catch(Me){Pt(r,r.return,Me)}break;case 4:dr(i,r),kr(r);break;case 13:dr(i,r),kr(r),v=r.child,v.flags&8192&&(C=v.memoizedState!==null,v.stateNode.isHidden=C,!C||v.alternate!==null&&v.alternate.memoizedState!==null||($d=Rt())),x&4&&z0(r);break;case 22:if(me=u!==null&&u.memoizedState!==null,r.mode&1?(an=(ne=an)||me,dr(i,r),an=ne):dr(i,r),kr(r),x&8192){if(ne=r.memoizedState!==null,(r.stateNode.isHidden=ne)&&!me&&(r.mode&1)!==0)for(Ae=r,me=r.child;me!==null;){for(he=Ae=me;Ae!==null;){switch(pe=Ae,Ce=pe.child,pe.tag){case 0:case 11:case 14:case 15:Uo(4,pe,pe.return);break;case 1:Li(pe,pe.return);var Re=pe.stateNode;if(typeof Re.componentWillUnmount=="function"){x=pe,u=pe.return;try{i=x,Re.props=i.memoizedProps,Re.state=i.memoizedState,Re.componentWillUnmount()}catch(Me){Pt(x,u,Me)}}break;case 5:Li(pe,pe.return);break;case 22:if(pe.memoizedState!==null){V0(he);continue}}Ce!==null?(Ce.return=pe,Ae=Ce):V0(he)}me=me.sibling}e:for(me=null,he=r;;){if(he.tag===5){if(me===null){me=he;try{v=he.stateNode,ne?(C=v.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none"):($=he.stateNode,U=he.memoizedProps.style,A=U!=null&&U.hasOwnProperty("display")?U.display:null,$.style.display=it("display",A))}catch(Me){Pt(r,r.return,Me)}}}else if(he.tag===6){if(me===null)try{he.stateNode.nodeValue=ne?"":he.memoizedProps}catch(Me){Pt(r,r.return,Me)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===r)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===r)break e;for(;he.sibling===null;){if(he.return===null||he.return===r)break e;me===he&&(me=null),he=he.return}me===he&&(me=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:dr(i,r),kr(r),x&4&&z0(r);break;case 21:break;default:dr(i,r),kr(r)}}function kr(r){var i=r.flags;if(i&2){try{e:{for(var u=r.return;u!==null;){if(F0(u)){var x=u;break e}u=u.return}throw Error(n(160))}switch(x.tag){case 5:var v=x.stateNode;x.flags&32&&(ke(v,""),x.flags&=-33);var C=O0(r);Od(r,C,v);break;case 3:case 4:var A=x.stateNode.containerInfo,$=O0(r);Fd(r,$,A);break;default:throw Error(n(161))}}catch(U){Pt(r,r.return,U)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function a8(r,i,u){Ae=r,H0(r)}function H0(r,i,u){for(var x=(r.mode&1)!==0;Ae!==null;){var v=Ae,C=v.child;if(v.tag===22&&x){var A=v.memoizedState!==null||El;if(!A){var $=v.alternate,U=$!==null&&$.memoizedState!==null||an;$=El;var ne=an;if(El=A,(an=U)&&!ne)for(Ae=v;Ae!==null;)A=Ae,U=A.child,A.tag===22&&A.memoizedState!==null?U0(v):U!==null?(U.return=A,Ae=U):U0(v);for(;C!==null;)Ae=C,H0(C),C=C.sibling;Ae=v,El=$,an=ne}B0(r)}else(v.subtreeFlags&8772)!==0&&C!==null?(C.return=v,Ae=C):B0(r)}}function B0(r){for(;Ae!==null;){var i=Ae;if((i.flags&8772)!==0){var u=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:an||Nl(5,i);break;case 1:var x=i.stateNode;if(i.flags&4&&!an)if(u===null)x.componentDidMount();else{var v=i.elementType===i.type?u.memoizedProps:cr(i.type,u.memoizedProps);x.componentDidUpdate(v,u.memoizedState,x.__reactInternalSnapshotBeforeUpdate)}var C=i.updateQueue;C!==null&&Vh(i,C,x);break;case 3:var A=i.updateQueue;if(A!==null){if(u=null,i.child!==null)switch(i.child.tag){case 5:u=i.child.stateNode;break;case 1:u=i.child.stateNode}Vh(i,A,u)}break;case 5:var $=i.stateNode;if(u===null&&i.flags&4){u=$;var U=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&u.focus();break;case"img":U.src&&(u.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var ne=i.alternate;if(ne!==null){var me=ne.memoizedState;if(me!==null){var he=me.dehydrated;he!==null&&ko(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}an||i.flags&512&&Ld(i)}catch(pe){Pt(i,i.return,pe)}}if(i===r){Ae=null;break}if(u=i.sibling,u!==null){u.return=i.return,Ae=u;break}Ae=i.return}}function V0(r){for(;Ae!==null;){var i=Ae;if(i===r){Ae=null;break}var u=i.sibling;if(u!==null){u.return=i.return,Ae=u;break}Ae=i.return}}function U0(r){for(;Ae!==null;){var i=Ae;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{Nl(4,i)}catch(U){Pt(i,u,U)}break;case 1:var x=i.stateNode;if(typeof x.componentDidMount=="function"){var v=i.return;try{x.componentDidMount()}catch(U){Pt(i,v,U)}}var C=i.return;try{Ld(i)}catch(U){Pt(i,C,U)}break;case 5:var A=i.return;try{Ld(i)}catch(U){Pt(i,A,U)}}}catch(U){Pt(i,i.return,U)}if(i===r){Ae=null;break}var $=i.sibling;if($!==null){$.return=i.return,Ae=$;break}Ae=i.return}}var l8=Math.ceil,Al=M.ReactCurrentDispatcher,Dd=M.ReactCurrentOwner,Yn=M.ReactCurrentBatchConfig,lt=0,qt=null,Ot=null,Xt=0,Ln=0,Fi=ds(0),Vt=0,Zo=null,qs=0,Rl=0,zd=0,Wo=null,bn=null,$d=0,Oi=1/0,Gr=null,Tl=!1,Hd=null,xs=null,Il=!1,ys=null,Pl=0,qo=0,Bd=null,Ml=-1,_l=0;function fn(){return(lt&6)!==0?Rt():Ml!==-1?Ml:Ml=Rt()}function vs(r){return(r.mode&1)===0?1:(lt&2)!==0&&Xt!==0?Xt&-Xt:Zw.transition!==null?(_l===0&&(_l=Zn()),_l):(r=ut,r!==0||(r=window.event,r=r===void 0?16:Wm(r.type)),r)}function fr(r,i,u,x){if(50<qo)throw qo=0,Bd=null,Error(n(185));$r(r,u,x),((lt&2)===0||r!==qt)&&(r===qt&&((lt&2)===0&&(Rl|=u),Vt===4&&bs(r,Xt)),wn(r,x),u===1&<===0&&(i.mode&1)===0&&(Oi=Rt()+500,ll&&ps()))}function wn(r,i){var u=r.callbackNode;gn(r,i);var x=rt(r,r===qt?Xt:0);if(x===0)u!==null&&ho(u),r.callbackNode=null,r.callbackPriority=0;else if(i=x&-x,r.callbackPriority!==i){if(u!=null&&ho(u),i===1)r.tag===0?Uw(W0.bind(null,r)):Ih(W0.bind(null,r)),$w(function(){(lt&6)===0&&ps()}),u=null;else{switch(zs(x)){case 1:u=go;break;case 4:u=Ha;break;case 16:u=mi;break;case 536870912:u=Ba;break;default:u=mi}u=eg(u,Z0.bind(null,r))}r.callbackPriority=i,r.callbackNode=u}}function Z0(r,i){if(Ml=-1,_l=0,(lt&6)!==0)throw Error(n(327));var u=r.callbackNode;if(Di()&&r.callbackNode!==u)return null;var x=rt(r,r===qt?Xt:0);if(x===0)return null;if((x&30)!==0||(x&r.expiredLanes)!==0||i)i=Ll(r,x);else{i=x;var v=lt;lt|=2;var C=G0();(qt!==r||Xt!==i)&&(Gr=null,Oi=Rt()+500,Ks(r,i));do try{d8();break}catch($){q0(r,$)}while(!0);od(),Al.current=C,lt=v,Ot!==null?i=0:(qt=null,Xt=0,i=Vt)}if(i!==0){if(i===2&&(v=pt(r),v!==0&&(x=v,i=Vd(r,v))),i===1)throw u=Zo,Ks(r,0),bs(r,x),wn(r,Rt()),u;if(i===6)bs(r,x);else{if(v=r.current.alternate,(x&30)===0&&!c8(v)&&(i=Ll(r,x),i===2&&(C=pt(r),C!==0&&(x=C,i=Vd(r,C))),i===1))throw u=Zo,Ks(r,0),bs(r,x),wn(r,Rt()),u;switch(r.finishedWork=v,r.finishedLanes=x,i){case 0:case 1:throw Error(n(345));case 2:Qs(r,bn,Gr);break;case 3:if(bs(r,x),(x&130023424)===x&&(i=$d+500-Rt(),10<i)){if(rt(r,0)!==0)break;if(v=r.suspendedLanes,(v&x)!==x){fn(),r.pingedLanes|=r.suspendedLanes&v;break}r.timeoutHandle=Ku(Qs.bind(null,r,bn,Gr),i);break}Qs(r,bn,Gr);break;case 4:if(bs(r,x),(x&4194240)===x)break;for(i=r.eventTimes,v=-1;0<x;){var A=31-In(x);C=1<<A,A=i[A],A>v&&(v=A),x&=~C}if(x=v,x=Rt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*l8(x/1960))-x,10<x){r.timeoutHandle=Ku(Qs.bind(null,r,bn,Gr),x);break}Qs(r,bn,Gr);break;case 5:Qs(r,bn,Gr);break;default:throw Error(n(329))}}}return wn(r,Rt()),r.callbackNode===u?Z0.bind(null,r):null}function Vd(r,i){var u=Wo;return r.current.memoizedState.isDehydrated&&(Ks(r,i).flags|=256),r=Ll(r,i),r!==2&&(i=bn,bn=u,i!==null&&Ud(i)),r}function Ud(r){bn===null?bn=r:bn.push.apply(bn,r)}function c8(r){for(var i=r;;){if(i.flags&16384){var u=i.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var x=0;x<u.length;x++){var v=u[x],C=v.getSnapshot;v=v.value;try{if(!ar(C(),v))return!1}catch{return!1}}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function bs(r,i){for(i&=~zd,i&=~Rl,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var u=31-In(i),x=1<<u;r[u]=-1,i&=~x}}function W0(r){if((lt&6)!==0)throw Error(n(327));Di();var i=rt(r,0);if((i&1)===0)return wn(r,Rt()),null;var u=Ll(r,i);if(r.tag!==0&&u===2){var x=pt(r);x!==0&&(i=x,u=Vd(r,x))}if(u===1)throw u=Zo,Ks(r,0),bs(r,i),wn(r,Rt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Qs(r,bn,Gr),wn(r,Rt()),null}function Zd(r,i){var u=lt;lt|=1;try{return r(i)}finally{lt=u,lt===0&&(Oi=Rt()+500,ll&&ps())}}function Gs(r){ys!==null&&ys.tag===0&&(lt&6)===0&&Di();var i=lt;lt|=1;var u=Yn.transition,x=ut;try{if(Yn.transition=null,ut=1,r)return r()}finally{ut=x,Yn.transition=u,lt=i,(lt&6)===0&&ps()}}function Wd(){Ln=Fi.current,Ct(Fi)}function Ks(r,i){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,zw(u)),Ot!==null)for(u=Ot.return;u!==null;){var x=u;switch(td(x),x.tag){case 1:x=x.type.childContextTypes,x!=null&&ol();break;case 3:Mi(),Ct(xn),Ct(rn),md();break;case 5:fd(x);break;case 4:Mi();break;case 13:Ct(Tt);break;case 19:Ct(Tt);break;case 10:ad(x.type._context);break;case 22:case 23:Wd()}u=u.return}if(qt=r,Ot=r=ws(r.current,null),Xt=Ln=i,Vt=0,Zo=null,zd=Rl=qs=0,bn=Wo=null,Us!==null){for(i=0;i<Us.length;i++)if(u=Us[i],x=u.interleaved,x!==null){u.interleaved=null;var v=x.next,C=u.pending;if(C!==null){var A=C.next;C.next=v,x.next=A}u.pending=x}Us=null}return r}function q0(r,i){do{var u=Ot;try{if(od(),yl.current=kl,vl){for(var x=It.memoizedState;x!==null;){var v=x.queue;v!==null&&(v.pending=null),x=x.next}vl=!1}if(Ws=0,Wt=Bt=It=null,zo=!1,$o=0,Dd.current=null,u===null||u.return===null){Vt=1,Zo=i,Ot=null;break}e:{var C=r,A=u.return,$=u,U=i;if(i=Xt,$.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var ne=U,me=$,he=me.tag;if((me.mode&1)===0&&(he===0||he===11||he===15)){var pe=me.alternate;pe?(me.updateQueue=pe.updateQueue,me.memoizedState=pe.memoizedState,me.lanes=pe.lanes):(me.updateQueue=null,me.memoizedState=null)}var Ce=y0(A);if(Ce!==null){Ce.flags&=-257,v0(Ce,A,$,C,i),Ce.mode&1&&x0(C,ne,i),i=Ce,U=ne;var Re=i.updateQueue;if(Re===null){var Me=new Set;Me.add(U),i.updateQueue=Me}else Re.add(U);break e}else{if((i&1)===0){x0(C,ne,i),qd();break e}U=Error(n(426))}}else if(Et&&$.mode&1){var _t=y0(A);if(_t!==null){(_t.flags&65536)===0&&(_t.flags|=256),v0(_t,A,$,C,i),sd(_i(U,$));break e}}C=U=_i(U,$),Vt!==4&&(Vt=2),Wo===null?Wo=[C]:Wo.push(C),C=A;do{switch(C.tag){case 3:C.flags|=65536,i&=-i,C.lanes|=i;var X=h0(C,U,i);Bh(C,X);break e;case 1:$=U;var q=C.type,ee=C.stateNode;if((C.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(xs===null||!xs.has(ee)))){C.flags|=65536,i&=-i,C.lanes|=i;var ve=g0(C,$,i);Bh(C,ve);break e}}C=C.return}while(C!==null)}Q0(u)}catch(Le){i=Le,Ot===u&&u!==null&&(Ot=u=u.return);continue}break}while(!0)}function G0(){var r=Al.current;return Al.current=kl,r===null?kl:r}function qd(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),qt===null||(qs&268435455)===0&&(Rl&268435455)===0||bs(qt,Xt)}function Ll(r,i){var u=lt;lt|=2;var x=G0();(qt!==r||Xt!==i)&&(Gr=null,Ks(r,i));do try{u8();break}catch(v){q0(r,v)}while(!0);if(od(),lt=u,Al.current=x,Ot!==null)throw Error(n(261));return qt=null,Xt=0,Vt}function u8(){for(;Ot!==null;)K0(Ot)}function d8(){for(;Ot!==null&&!xu();)K0(Ot)}function K0(r){var i=J0(r.alternate,r,Ln);r.memoizedProps=r.pendingProps,i===null?Q0(r):Ot=i,Dd.current=null}function Q0(r){var i=r;do{var u=i.alternate;if(r=i.return,(i.flags&32768)===0){if(u=r8(u,i,Ln),u!==null){Ot=u;return}}else{if(u=s8(u,i),u!==null){u.flags&=32767,Ot=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Vt=6,Ot=null;return}}if(i=i.sibling,i!==null){Ot=i;return}Ot=i=r}while(i!==null);Vt===0&&(Vt=5)}function Qs(r,i,u){var x=ut,v=Yn.transition;try{Yn.transition=null,ut=1,f8(r,i,u,x)}finally{Yn.transition=v,ut=x}return null}function f8(r,i,u,x){do Di();while(ys!==null);if((lt&6)!==0)throw Error(n(327));u=r.finishedWork;var v=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var C=u.lanes|u.childLanes;if(ju(r,C),r===qt&&(Ot=qt=null,Xt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Il||(Il=!0,eg(mi,function(){return Di(),null})),C=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||C){C=Yn.transition,Yn.transition=null;var A=ut;ut=1;var $=lt;lt|=4,Dd.current=null,o8(r,u),$0(u,r),Pw(qu),Wa=!!Wu,qu=Wu=null,r.current=u,a8(u),yu(),lt=$,ut=A,Yn.transition=C}else r.current=u;if(Il&&(Il=!1,ys=r,Pl=v),C=r.pendingLanes,C===0&&(xs=null),wu(u.stateNode),wn(r,Rt()),i!==null)for(x=r.onRecoverableError,u=0;u<i.length;u++)v=i[u],x(v.value,{componentStack:v.stack,digest:v.digest});if(Tl)throw Tl=!1,r=Hd,Hd=null,r;return(Pl&1)!==0&&r.tag!==0&&Di(),C=r.pendingLanes,(C&1)!==0?r===Bd?qo++:(qo=0,Bd=r):qo=0,ps(),null}function Di(){if(ys!==null){var r=zs(Pl),i=Yn.transition,u=ut;try{if(Yn.transition=null,ut=16>r?16:r,ys===null)var x=!1;else{if(r=ys,ys=null,Pl=0,(lt&6)!==0)throw Error(n(331));var v=lt;for(lt|=4,Ae=r.current;Ae!==null;){var C=Ae,A=C.child;if((Ae.flags&16)!==0){var $=C.deletions;if($!==null){for(var U=0;U<$.length;U++){var ne=$[U];for(Ae=ne;Ae!==null;){var me=Ae;switch(me.tag){case 0:case 11:case 15:Uo(8,me,C)}var he=me.child;if(he!==null)he.return=me,Ae=he;else for(;Ae!==null;){me=Ae;var pe=me.sibling,Ce=me.return;if(L0(me),me===ne){Ae=null;break}if(pe!==null){pe.return=Ce,Ae=pe;break}Ae=Ce}}}var Re=C.alternate;if(Re!==null){var Me=Re.child;if(Me!==null){Re.child=null;do{var _t=Me.sibling;Me.sibling=null,Me=_t}while(Me!==null)}}Ae=C}}if((C.subtreeFlags&2064)!==0&&A!==null)A.return=C,Ae=A;else e:for(;Ae!==null;){if(C=Ae,(C.flags&2048)!==0)switch(C.tag){case 0:case 11:case 15:Uo(9,C,C.return)}var X=C.sibling;if(X!==null){X.return=C.return,Ae=X;break e}Ae=C.return}}var q=r.current;for(Ae=q;Ae!==null;){A=Ae;var ee=A.child;if((A.subtreeFlags&2064)!==0&&ee!==null)ee.return=A,Ae=ee;else e:for(A=q;Ae!==null;){if($=Ae,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:Nl(9,$)}}catch(Le){Pt($,$.return,Le)}if($===A){Ae=null;break e}var ve=$.sibling;if(ve!==null){ve.return=$.return,Ae=ve;break e}Ae=$.return}}if(lt=v,ps(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(hi,r)}catch{}x=!0}return x}finally{ut=u,Yn.transition=i}}return!1}function Y0(r,i,u){i=_i(u,i),i=h0(r,i,1),r=hs(r,i,1),i=fn(),r!==null&&($r(r,1,i),wn(r,i))}function Pt(r,i,u){if(r.tag===3)Y0(r,r,u);else for(;i!==null;){if(i.tag===3){Y0(i,r,u);break}else if(i.tag===1){var x=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&(xs===null||!xs.has(x))){r=_i(u,r),r=g0(i,r,1),i=hs(i,r,1),r=fn(),i!==null&&($r(i,1,r),wn(i,r));break}}i=i.return}}function p8(r,i,u){var x=r.pingCache;x!==null&&x.delete(i),i=fn(),r.pingedLanes|=r.suspendedLanes&u,qt===r&&(Xt&u)===u&&(Vt===4||Vt===3&&(Xt&130023424)===Xt&&500>Rt()-$d?Ks(r,0):zd|=u),wn(r,i)}function X0(r,i){i===0&&((r.mode&1)===0?i=1:(i=V,V<<=1,(V&130023424)===0&&(V=4194304)));var u=fn();r=Zr(r,i),r!==null&&($r(r,i,u),wn(r,u))}function m8(r){var i=r.memoizedState,u=0;i!==null&&(u=i.retryLane),X0(r,u)}function h8(r,i){var u=0;switch(r.tag){case 13:var x=r.stateNode,v=r.memoizedState;v!==null&&(u=v.retryLane);break;case 19:x=r.stateNode;break;default:throw Error(n(314))}x!==null&&x.delete(i),X0(r,u)}var J0;J0=function(r,i,u){if(r!==null)if(r.memoizedProps!==i.pendingProps||xn.current)vn=!0;else{if((r.lanes&u)===0&&(i.flags&128)===0)return vn=!1,n8(r,i,u);vn=(r.flags&131072)!==0}else vn=!1,Et&&(i.flags&1048576)!==0&&Ph(i,ul,i.index);switch(i.lanes=0,i.tag){case 2:var x=i.type;jl(r,i),r=i.pendingProps;var v=Ei(i,rn.current);Pi(i,u),v=xd(null,i,x,r,v,u);var C=yd();return i.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,yn(x)?(C=!0,al(i)):C=!1,i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,ud(i),v.updater=Sl,i.stateNode=v,v._reactInternals=i,Cd(i,x,r,u),i=Ad(null,i,x,!0,C,u)):(i.tag=0,Et&&C&&ed(i),dn(null,i,v,u),i=i.child),i;case 16:x=i.elementType;e:{switch(jl(r,i),r=i.pendingProps,v=x._init,x=v(x._payload),i.type=x,v=i.tag=x8(x),r=cr(x,r),v){case 0:i=Nd(null,i,x,r,u);break e;case 1:i=j0(null,i,x,r,u);break e;case 11:i=b0(null,i,x,r,u);break e;case 14:i=w0(null,i,x,cr(x.type,r),u);break e}throw Error(n(306,x,""))}return i;case 0:return x=i.type,v=i.pendingProps,v=i.elementType===x?v:cr(x,v),Nd(r,i,x,v,u);case 1:return x=i.type,v=i.pendingProps,v=i.elementType===x?v:cr(x,v),j0(r,i,x,v,u);case 3:e:{if(E0(i),r===null)throw Error(n(387));x=i.pendingProps,C=i.memoizedState,v=C.element,Hh(r,i),gl(i,x,null,u);var A=i.memoizedState;if(x=A.element,C.isDehydrated)if(C={element:x,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},i.updateQueue.baseState=C,i.memoizedState=C,i.flags&256){v=_i(Error(n(423)),i),i=N0(r,i,x,u,v);break e}else if(x!==v){v=_i(Error(n(424)),i),i=N0(r,i,x,u,v);break e}else for(_n=us(i.stateNode.containerInfo.firstChild),Mn=i,Et=!0,lr=null,u=zh(i,null,x,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ri(),x===v){i=qr(r,i,u);break e}dn(r,i,x,u)}i=i.child}return i;case 5:return Uh(i),r===null&&rd(i),x=i.type,v=i.pendingProps,C=r!==null?r.memoizedProps:null,A=v.children,Gu(x,v)?A=null:C!==null&&Gu(x,C)&&(i.flags|=32),C0(r,i),dn(r,i,A,u),i.child;case 6:return r===null&&rd(i),null;case 13:return A0(r,i,u);case 4:return dd(i,i.stateNode.containerInfo),x=i.pendingProps,r===null?i.child=Ti(i,null,x,u):dn(r,i,x,u),i.child;case 11:return x=i.type,v=i.pendingProps,v=i.elementType===x?v:cr(x,v),b0(r,i,x,v,u);case 7:return dn(r,i,i.pendingProps,u),i.child;case 8:return dn(r,i,i.pendingProps.children,u),i.child;case 12:return dn(r,i,i.pendingProps.children,u),i.child;case 10:e:{if(x=i.type._context,v=i.pendingProps,C=i.memoizedProps,A=v.value,wt(pl,x._currentValue),x._currentValue=A,C!==null)if(ar(C.value,A)){if(C.children===v.children&&!xn.current){i=qr(r,i,u);break e}}else for(C=i.child,C!==null&&(C.return=i);C!==null;){var $=C.dependencies;if($!==null){A=C.child;for(var U=$.firstContext;U!==null;){if(U.context===x){if(C.tag===1){U=Wr(-1,u&-u),U.tag=2;var ne=C.updateQueue;if(ne!==null){ne=ne.shared;var me=ne.pending;me===null?U.next=U:(U.next=me.next,me.next=U),ne.pending=U}}C.lanes|=u,U=C.alternate,U!==null&&(U.lanes|=u),ld(C.return,u,i),$.lanes|=u;break}U=U.next}}else if(C.tag===10)A=C.type===i.type?null:C.child;else if(C.tag===18){if(A=C.return,A===null)throw Error(n(341));A.lanes|=u,$=A.alternate,$!==null&&($.lanes|=u),ld(A,u,i),A=C.sibling}else A=C.child;if(A!==null)A.return=C;else for(A=C;A!==null;){if(A===i){A=null;break}if(C=A.sibling,C!==null){C.return=A.return,A=C;break}A=A.return}C=A}dn(r,i,v.children,u),i=i.child}return i;case 9:return v=i.type,x=i.pendingProps.children,Pi(i,u),v=Kn(v),x=x(v),i.flags|=1,dn(r,i,x,u),i.child;case 14:return x=i.type,v=cr(x,i.pendingProps),v=cr(x.type,v),w0(r,i,x,v,u);case 15:return k0(r,i,i.type,i.pendingProps,u);case 17:return x=i.type,v=i.pendingProps,v=i.elementType===x?v:cr(x,v),jl(r,i),i.tag=1,yn(x)?(r=!0,al(i)):r=!1,Pi(i,u),p0(i,x,v),Cd(i,x,v,u),Ad(null,i,x,!0,r,u);case 19:return T0(r,i,u);case 22:return S0(r,i,u)}throw Error(n(156,i.tag))};function eg(r,i){return $a(r,i)}function g8(r,i,u,x){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(r,i,u,x){return new g8(r,i,u,x)}function Gd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function x8(r){if(typeof r=="function")return Gd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===W)return 11;if(r===F)return 14}return 2}function ws(r,i){var u=r.alternate;return u===null?(u=Xn(r.tag,i,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=i,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,i=r.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Fl(r,i,u,x,v,C){var A=2;if(x=r,typeof r=="function")Gd(r)&&(A=1);else if(typeof r=="string")A=5;else e:switch(r){case P:return Ys(u.children,v,C,i);case L:A=8,v|=8;break;case G:return r=Xn(12,u,i,v|2),r.elementType=G,r.lanes=C,r;case Y:return r=Xn(13,u,i,v),r.elementType=Y,r.lanes=C,r;case Q:return r=Xn(19,u,i,v),r.elementType=Q,r.lanes=C,r;case K:return Ol(u,v,C,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case D:A=10;break e;case B:A=9;break e;case W:A=11;break e;case F:A=14;break e;case Z:A=16,x=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=Xn(A,u,i,v),i.elementType=r,i.type=x,i.lanes=C,i}function Ys(r,i,u,x){return r=Xn(7,r,x,i),r.lanes=u,r}function Ol(r,i,u,x){return r=Xn(22,r,x,i),r.elementType=K,r.lanes=u,r.stateNode={isHidden:!1},r}function Kd(r,i,u){return r=Xn(6,r,null,i),r.lanes=u,r}function Qd(r,i,u){return i=Xn(4,r.children!==null?r.children:[],r.key,i),i.lanes=u,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function y8(r,i,u,x,v){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.identifierPrefix=x,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function Yd(r,i,u,x,v,C,A,$,U){return r=new y8(r,i,u,$,U),i===1?(i=1,C===!0&&(i|=8)):i=0,C=Xn(3,null,null,i),r.current=C,C.stateNode=r,C.memoizedState={element:x,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},ud(C),r}function v8(r,i,u){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:x==null?null:""+x,children:r,containerInfo:i,implementation:u}}function tg(r){if(!r)return fs;r=r._reactInternals;e:{if(zr(r)!==r||r.tag!==1)throw Error(n(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(yn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(yn(u))return Rh(r,u,i)}return i}function ng(r,i,u,x,v,C,A,$,U){return r=Yd(u,x,!0,r,v,C,A,$,U),r.context=tg(null),u=r.current,x=fn(),v=vs(u),C=Wr(x,v),C.callback=i??null,hs(u,C,v),r.current.lanes=v,$r(r,v,x),wn(r,x),r}function Dl(r,i,u,x){var v=i.current,C=fn(),A=vs(v);return u=tg(u),i.context===null?i.context=u:i.pendingContext=u,i=Wr(C,A),i.payload={element:r},x=x===void 0?null:x,x!==null&&(i.callback=x),r=hs(v,i,A),r!==null&&(fr(r,v,A,C),hl(r,v,A)),A}function zl(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function rg(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<i?u:i}}function Xd(r,i){rg(r,i),(r=r.alternate)&&rg(r,i)}function b8(){return null}var sg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Jd(r){this._internalRoot=r}$l.prototype.render=Jd.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));Dl(r,i,null,null)},$l.prototype.unmount=Jd.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Gs(function(){Dl(null,r,null,null)}),i[Hr]=null}};function $l(r){this._internalRoot=r}$l.prototype.unstable_scheduleHydration=function(r){if(r){var i=Hm();r={blockedOn:null,target:r,priority:i};for(var u=0;u<as.length&&i!==0&&i<as[u].priority;u++);as.splice(u,0,r),u===0&&Um(r)}};function ef(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Hl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function ig(){}function w8(r,i,u,x,v){if(v){if(typeof x=="function"){var C=x;x=function(){var ne=zl(A);C.call(ne)}}var A=ng(i,x,r,0,null,!1,!1,"",ig);return r._reactRootContainer=A,r[Hr]=A.current,Io(r.nodeType===8?r.parentNode:r),Gs(),A}for(;v=r.lastChild;)r.removeChild(v);if(typeof x=="function"){var $=x;x=function(){var ne=zl(U);$.call(ne)}}var U=Yd(r,0,!1,null,null,!1,!1,"",ig);return r._reactRootContainer=U,r[Hr]=U.current,Io(r.nodeType===8?r.parentNode:r),Gs(function(){Dl(i,U,u,x)}),U}function Bl(r,i,u,x,v){var C=u._reactRootContainer;if(C){var A=C;if(typeof v=="function"){var $=v;v=function(){var U=zl(A);$.call(U)}}Dl(i,A,r,v)}else A=w8(u,i,r,v,x);return zl(A)}Wn=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var u=Se(i.pendingLanes);u!==0&&(xo(i,u|1),wn(i,Rt()),(lt&6)===0&&(Oi=Rt()+500,ps()))}break;case 13:Gs(function(){var x=Zr(r,1);if(x!==null){var v=fn();fr(x,r,1,v)}}),Xd(r,1)}},gi=function(r){if(r.tag===13){var i=Zr(r,134217728);if(i!==null){var u=fn();fr(i,r,134217728,u)}Xd(r,134217728)}},Va=function(r){if(r.tag===13){var i=vs(r),u=Zr(r,i);if(u!==null){var x=fn();fr(u,r,i,x)}Xd(r,i)}},Hm=function(){return ut},Bm=function(r,i){var u=ut;try{return ut=r,i()}finally{ut=u}},Fr=function(r,i,u){switch(i){case"input":if(Ye(r,u),i=u.name,u.type==="radio"&&i!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<u.length;i++){var x=u[i];if(x!==r&&x.form===r.form){var v=il(x);if(!v)throw Error(n(90));be(x),Ye(x,v)}}}break;case"textarea":Bn(r,u);break;case"select":i=u.value,i!=null&&Qt(r,!!u.multiple,i,!1)}},Fe=Zd,qe=Gs;var k8={usingClientEntryPoint:!1,Events:[_o,Ci,il,Or,we,Zd]},Go={findFiberByHostInstance:$s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},S8={bundleType:Go.bundleType,version:Go.version,rendererPackageName:Go.rendererPackageName,rendererConfig:Go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Da(r),r===null?null:r.stateNode},findFiberByHostInstance:Go.findFiberByHostInstance||b8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vl.isDisabled&&Vl.supportsFiber)try{hi=Vl.inject(S8),Un=Vl}catch{}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k8,kn.createPortal=function(r,i){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ef(i))throw Error(n(200));return v8(r,i,null,u)},kn.createRoot=function(r,i){if(!ef(r))throw Error(n(299));var u=!1,x="",v=sg;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(x=i.identifierPrefix),i.onRecoverableError!==void 0&&(v=i.onRecoverableError)),i=Yd(r,1,!1,null,null,u,!1,x,v),r[Hr]=i.current,Io(r.nodeType===8?r.parentNode:r),new Jd(i)},kn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Da(i),r=r===null?null:r.stateNode,r},kn.flushSync=function(r){return Gs(r)},kn.hydrate=function(r,i,u){if(!Hl(i))throw Error(n(200));return Bl(null,r,i,!0,u)},kn.hydrateRoot=function(r,i,u){if(!ef(r))throw Error(n(405));var x=u!=null&&u.hydratedSources||null,v=!1,C="",A=sg;if(u!=null&&(u.unstable_strictMode===!0&&(v=!0),u.identifierPrefix!==void 0&&(C=u.identifierPrefix),u.onRecoverableError!==void 0&&(A=u.onRecoverableError)),i=ng(i,null,r,1,u??null,v,!1,C,A),r[Hr]=i.current,Io(r),x)for(r=0;r<x.length;r++)u=x[r],v=u._getVersion,v=v(u._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[u,v]:i.mutableSourceEagerHydrationData.push(u,v);return new $l(i)},kn.render=function(r,i,u){if(!Hl(i))throw Error(n(200));return Bl(null,r,i,!1,u)},kn.unmountComponentAtNode=function(r){if(!Hl(r))throw Error(n(40));return r._reactRootContainer?(Gs(function(){Bl(null,null,r,!1,function(){r._reactRootContainer=null,r[Hr]=null})}),!0):!1},kn.unstable_batchedUpdates=Zd,kn.unstable_renderSubtreeIntoContainer=function(r,i,u,x){if(!Hl(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Bl(r,i,u,!1,x)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var pg;function _x(){if(pg)return rf.exports;pg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rf.exports=I8(),rf.exports}var mg;function P8(){if(mg)return Ul;mg=1;var e=_x();return Ul.createRoot=e.createRoot,Ul.hydrateRoot=e.hydrateRoot,Ul}var M8=P8();const _8=ja(M8);var Ea=_x();const L8=ja(Ea);function da(){return da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},da.apply(this,arguments)}var Ns;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ns||(Ns={}));const hg="popstate";function F8(e){e===void 0&&(e={});function t(s,o){let{pathname:l,search:c,hash:f}=s.location;return Wf("",{pathname:l,search:c,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){return typeof o=="string"?o:Lx(o)}return D8(t,n,null,e)}function Zt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ip(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function O8(){return Math.random().toString(36).substr(2,8)}function gg(e,t){return{usr:e.state,key:e.key,idx:t}}function Wf(e,t,n,s){return n===void 0&&(n=null),da({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?so(t):t,{state:n,key:t&&t.key||s||O8()})}function Lx(e){let{pathname:t="/",search:n="",hash:s=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function so(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function D8(e,t,n,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:l=!1}=s,c=o.history,f=Ns.Pop,p=null,m=h();m==null&&(m=0,c.replaceState(da({},c.state,{idx:m}),""));function h(){return(c.state||{idx:null}).idx}function g(){f=Ns.Pop;let S=h(),j=S==null?null:S-m;m=S,p&&p({action:f,location:w.location,delta:j})}function y(S,j){f=Ns.Push;let E=Wf(w.location,S,j);m=h()+1;let N=gg(E,m),M=w.createHref(E);try{c.pushState(N,"",M)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(M)}l&&p&&p({action:f,location:w.location,delta:1})}function b(S,j){f=Ns.Replace;let E=Wf(w.location,S,j);m=h();let N=gg(E,m),M=w.createHref(E);c.replaceState(N,"",M),l&&p&&p({action:f,location:w.location,delta:0})}function k(S){let j=o.location.origin!=="null"?o.location.origin:o.location.href,E=typeof S=="string"?S:Lx(S);return E=E.replace(/ $/,"%20"),Zt(j,"No window.location.(origin|href) available to create URL for href: "+E),new URL(E,j)}let w={get action(){return f},get location(){return e(o,c)},listen(S){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(hg,g),p=S,()=>{o.removeEventListener(hg,g),p=null}},createHref(S){return t(o,S)},createURL:k,encodeLocation(S){let j=k(S);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:y,replace:b,go(S){return c.go(S)}};return w}var xg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(xg||(xg={}));function z8(e,t,n){return n===void 0&&(n="/"),$8(e,t,n)}function $8(e,t,n,s){let o=typeof t=="string"?so(t):t,l=Dx(o.pathname||"/",n);if(l==null)return null;let c=Fx(e);H8(c);let f=null;for(let p=0;f==null&&p<c.length;++p){let m=J8(l);f=Q8(c[p],m)}return f}function Fx(e,t,n,s){t===void 0&&(t=[]),n===void 0&&(n=[]),s===void 0&&(s="");let o=(l,c,f)=>{let p={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};p.relativePath.startsWith("/")&&(Zt(p.relativePath.startsWith(s),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(s.length));let m=ti([s,p.relativePath]),h=n.concat(p);l.children&&l.children.length>0&&(Zt(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),Fx(l.children,t,h,m)),!(l.path==null&&!l.index)&&t.push({path:m,score:G8(m,l.index),routesMeta:h})};return e.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,c);else for(let p of Ox(l.path))o(l,c,p)}),t}function Ox(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let c=Ox(s.join("/")),f=[];return f.push(...c.map(p=>p===""?l:[l,p].join("/"))),o&&f.push(...c),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function H8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:K8(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const B8=/^:[\w-]+$/,V8=3,U8=2,Z8=1,W8=10,q8=-2,yg=e=>e==="*";function G8(e,t){let n=e.split("/"),s=n.length;return n.some(yg)&&(s+=q8),t&&(s+=U8),n.filter(o=>!yg(o)).reduce((o,l)=>o+(B8.test(l)?V8:l===""?Z8:W8),s)}function K8(e,t){return e.length===t.length&&e.slice(0,-1).every((s,o)=>s===t[o])?e[e.length-1]-t[t.length-1]:0}function Q8(e,t,n){let{routesMeta:s}=e,o={},l="/",c=[];for(let f=0;f<s.length;++f){let p=s[f],m=f===s.length-1,h=l==="/"?t:t.slice(l.length)||"/",g=Y8({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},h),y=p.route;if(!g)return null;Object.assign(o,g.params),c.push({params:o,pathname:ti([l,g.pathname]),pathnameBase:o6(ti([l,g.pathnameBase])),route:y}),g.pathnameBase!=="/"&&(l=ti([l,g.pathnameBase]))}return c}function Y8(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=X8(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let l=o[0],c=l.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:s.reduce((m,h,g)=>{let{paramName:y,isOptional:b}=h;if(y==="*"){let w=f[g]||"";c=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const k=f[g];return b&&!k?m[y]=void 0:m[y]=(k||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:c,pattern:e}}function X8(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ip(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,p)=>(s.push({paramName:f,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),s]}function J8(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ip(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Dx(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}const e6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,t6=e=>e6.test(e);function n6(e,t){t===void 0&&(t="/");let{pathname:n,search:s="",hash:o=""}=typeof e=="string"?so(e):e,l;if(n)if(t6(n))l=n;else{if(n.includes("//")){let c=n;n=n.replace(/\/\/+/g,"/"),Ip(!1,"Pathnames cannot have embedded double slashes - normalizing "+(c+" -> "+n))}n.startsWith("/")?l=vg(n.substring(1),"/"):l=vg(n,t)}else l=t;return{pathname:l,search:a6(s),hash:l6(o)}}function vg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function af(e,t,n,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function r6(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function s6(e,t){let n=r6(e);return t?n.map((s,o)=>o===n.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function i6(e,t,n,s){s===void 0&&(s=!1);let o;typeof e=="string"?o=so(e):(o=da({},e),Zt(!o.pathname||!o.pathname.includes("?"),af("?","pathname","search",o)),Zt(!o.pathname||!o.pathname.includes("#"),af("#","pathname","hash",o)),Zt(!o.search||!o.search.includes("#"),af("#","search","hash",o)));let l=e===""||o.pathname==="",c=l?"/":o.pathname,f;if(c==null)f=n;else{let g=t.length-1;if(!s&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),g-=1;o.pathname=y.join("/")}f=g>=0?t[g]:"/"}let p=n6(o,f),m=c&&c!=="/"&&c.endsWith("/"),h=(l||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(m||h)&&(p.pathname+="/"),p}const ti=e=>e.join("/").replace(/\/\/+/g,"/"),o6=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),a6=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,l6=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function c6(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const zx=["post","put","patch","delete"];new Set(zx);const u6=["get",...zx];new Set(u6);function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},fa.apply(this,arguments)}const Pp=d.createContext(null),d6=d.createContext(null),Ic=d.createContext(null),Pc=d.createContext(null),ui=d.createContext({outlet:null,matches:[],isDataRoute:!1}),$x=d.createContext(null);function Mc(){return d.useContext(Pc)!=null}function Mp(){return Mc()||Zt(!1),d.useContext(Pc).location}function Hx(e){d.useContext(Ic).static||d.useLayoutEffect(e)}function _p(){let{isDataRoute:e}=d.useContext(ui);return e?j6():f6()}function f6(){Mc()||Zt(!1);let e=d.useContext(Pp),{basename:t,future:n,navigator:s}=d.useContext(Ic),{matches:o}=d.useContext(ui),{pathname:l}=Mp(),c=JSON.stringify(s6(o,n.v7_relativeSplatPath)),f=d.useRef(!1);return Hx(()=>{f.current=!0}),d.useCallback(function(m,h){if(h===void 0&&(h={}),!f.current)return;if(typeof m=="number"){s.go(m);return}let g=i6(m,JSON.parse(c),l,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:ti([t,g.pathname])),(h.replace?s.replace:s.push)(g,h.state,h)},[t,s,c,l,e])}function p6(){let{matches:e}=d.useContext(ui),t=e[e.length-1];return t?t.params:{}}function m6(e,t){return h6(e,t)}function h6(e,t,n,s){Mc()||Zt(!1);let{navigator:o}=d.useContext(Ic),{matches:l}=d.useContext(ui),c=l[l.length-1],f=c?c.params:{};c&&c.pathname;let p=c?c.pathnameBase:"/";c&&c.route;let m=Mp(),h;if(t){var g;let S=typeof t=="string"?so(t):t;p==="/"||(g=S.pathname)!=null&&g.startsWith(p)||Zt(!1),h=S}else h=m;let y=h.pathname||"/",b=y;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(S.length).join("/")}let k=z8(e,{pathname:b}),w=b6(k&&k.map(S=>Object.assign({},S,{params:Object.assign({},f,S.params),pathname:ti([p,o.encodeLocation?o.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:ti([p,o.encodeLocation?o.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,n,s);return t&&w?d.createElement(Pc.Provider,{value:{location:fa({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Ns.Pop}},w):w}function g6(){let e=C6(),t=c6(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),n?d.createElement("pre",{style:o},n):null,null)}const x6=d.createElement(g6,null);class y6 extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?d.createElement(ui.Provider,{value:this.props.routeContext},d.createElement($x.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function v6(e){let{routeContext:t,match:n,children:s}=e,o=d.useContext(Pp);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(ui.Provider,{value:t},s)}function b6(e,t,n,s){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),s===void 0&&(s=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=s)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let c=e,f=(o=n)==null?void 0:o.errors;if(f!=null){let h=c.findIndex(g=>g.route.id&&f?.[g.route.id]!==void 0);h>=0||Zt(!1),c=c.slice(0,Math.min(c.length,h+1))}let p=!1,m=-1;if(n&&s&&s.v7_partialHydration)for(let h=0;h<c.length;h++){let g=c[h];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(m=h),g.route.id){let{loaderData:y,errors:b}=n,k=g.route.loader&&y[g.route.id]===void 0&&(!b||b[g.route.id]===void 0);if(g.route.lazy||k){p=!0,m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}return c.reduceRight((h,g,y)=>{let b,k=!1,w=null,S=null;n&&(b=f&&g.route.id?f[g.route.id]:void 0,w=g.route.errorElement||x6,p&&(m<0&&y===0?(E6("route-fallback"),k=!0,S=null):m===y&&(k=!0,S=g.route.hydrateFallbackElement||null)));let j=t.concat(c.slice(0,y+1)),E=()=>{let N;return b?N=w:k?N=S:g.route.Component?N=d.createElement(g.route.Component,null):g.route.element?N=g.route.element:N=h,d.createElement(v6,{match:g,routeContext:{outlet:h,matches:j,isDataRoute:n!=null},children:N})};return n&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?d.createElement(y6,{location:n.location,revalidation:n.revalidation,component:w,error:b,children:E(),routeContext:{outlet:null,matches:j,isDataRoute:!0}}):E()},null)}var Bx=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Bx||{}),Vx=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Vx||{});function w6(e){let t=d.useContext(Pp);return t||Zt(!1),t}function k6(e){let t=d.useContext(d6);return t||Zt(!1),t}function S6(e){let t=d.useContext(ui);return t||Zt(!1),t}function Ux(e){let t=S6(),n=t.matches[t.matches.length-1];return n.route.id||Zt(!1),n.route.id}function C6(){var e;let t=d.useContext($x),n=k6(),s=Ux();return t!==void 0?t:(e=n.errors)==null?void 0:e[s]}function j6(){let{router:e}=w6(Bx.UseNavigateStable),t=Ux(Vx.UseNavigateStable),n=d.useRef(!1);return Hx(()=>{n.current=!0}),d.useCallback(function(o,l){l===void 0&&(l={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,fa({fromRouteId:t},l)))},[e,t])}const bg={};function E6(e,t,n){bg[e]||(bg[e]=!0)}function N6(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath}function Yr(e){Zt(!1)}function A6(e){let{basename:t="/",children:n=null,location:s,navigationType:o=Ns.Pop,navigator:l,static:c=!1,future:f}=e;Mc()&&Zt(!1);let p=t.replace(/^\/*/,"/"),m=d.useMemo(()=>({basename:p,navigator:l,static:c,future:fa({v7_relativeSplatPath:!1},f)}),[p,f,l,c]);typeof s=="string"&&(s=so(s));let{pathname:h="/",search:g="",hash:y="",state:b=null,key:k="default"}=s,w=d.useMemo(()=>{let S=Dx(h,p);return S==null?null:{location:{pathname:S,search:g,hash:y,state:b,key:k},navigationType:o}},[p,h,g,y,b,k,o]);return w==null?null:d.createElement(Ic.Provider,{value:m},d.createElement(Pc.Provider,{children:n,value:w}))}function Zx(e){let{children:t,location:n}=e;return m6(qf(t),n)}new Promise(()=>{});function qf(e,t){t===void 0&&(t=[]);let n=[];return d.Children.forEach(e,(s,o)=>{if(!d.isValidElement(s))return;let l=[...t,o];if(s.type===d.Fragment){n.push.apply(n,qf(s.props.children,l));return}s.type!==Yr&&Zt(!1),!s.props.index||!s.props.children||Zt(!1);let c={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(c.children=qf(s.props.children,l)),n.push(c)}),n}const R6="6";try{window.__reactRouterVersion=R6}catch{}const T6="startTransition",wg=Tc[T6];function I6(e){let{basename:t,children:n,future:s,window:o}=e,l=d.useRef();l.current==null&&(l.current=F8({window:o,v5Compat:!0}));let c=l.current,[f,p]=d.useState({action:c.action,location:c.location}),{v7_startTransition:m}=s||{},h=d.useCallback(g=>{m&&wg?wg(()=>p(g)):p(g)},[p,m]);return d.useLayoutEffect(()=>c.listen(h),[c,h]),d.useEffect(()=>N6(s),[s]),d.createElement(A6,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:c,future:s})}var kg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(kg||(kg={}));var Sg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Sg||(Sg={}));const Wx="claudia-auth-token";function Xi(){const e=document.cookie.split(";");for(const t of e){const[n,s]=t.trim().split("=");if(n===Wx)return decodeURIComponent(s)}return null}function qx(e){const t=new Date;t.setDate(t.getDate()+7),document.cookie=`${Wx}=${encodeURIComponent(e)}; expires=${t.toUTCString()}; path=/; SameSite=Strict`}function P6(){const e=window.location.hash;if(!e.startsWith("#token="))return null;const t=e.substring(7);return t.length!==32||!/^[a-f0-9]+$/.test(t)?(console.warn("Invalid token format in URL fragment"),null):t}function M6(){window.history&&window.history.replaceState?window.history.replaceState(null,"",window.location.pathname+window.location.search):window.location.hash=""}function _6(){d.useEffect(()=>{const e=P6();e&&(qx(e),M6(),console.log("Authentication token stored successfully"))},[])}const L6=3e4;class F6{baseUrl="";async apiCall(t,n){const s=`${this.baseUrl}${t}`,o=n?.timeout??L6,l=Xi(),c=new Headers(n?.headers);c.set("Content-Type","application/json"),l&&c.set("Authorization",`Bearer ${l}`);const f=new AbortController,p=setTimeout(()=>f.abort(),o);try{const m=await fetch(s,{...n,headers:c,signal:f.signal});clearTimeout(p);const h=await m.json();if(!m.ok)throw m.status===401?new Error("Unauthorized"):new Error(h.error||`HTTP ${m.status}`);return h}catch(m){throw clearTimeout(p),m.name==="AbortError"?new Error(`Request timeout after ${o}ms: ${t}`):m}}async getConversations(t){const n=new URLSearchParams;return t?.limit&&n.append("limit",t.limit.toString()),t?.offset&&n.append("offset",t.offset.toString()),t?.projectPath&&n.append("projectPath",t.projectPath),t?.hasContinuation!==void 0&&n.append("hasContinuation",t.hasContinuation.toString()),t?.archived!==void 0&&n.append("archived",t.archived.toString()),t?.pinned!==void 0&&n.append("pinned",t.pinned.toString()),n.append("sortBy","updated"),n.append("order","desc"),this.apiCall(`/api/conversations?${n}`)}async getConversationDetails(t,n){const s=new URLSearchParams;n?.limit&&s.set("limit",String(n.limit)),n?.before&&s.set("before",n.before);const o=s.toString(),l=`/api/conversations/${t}${o?`?${o}`:""}`;return this.apiCall(l)}async startConversation(t){return this.apiCall("/api/conversations/start",{method:"POST",body:JSON.stringify(t)})}async stopConversation(t){return this.apiCall(`/api/conversations/${t}/stop`,{method:"POST"})}async stopSession(t){return this.apiCall(`/api/conversations/session/${t}/stop`,{method:"POST"})}async forceKillSession(t){return this.apiCall(`/api/conversations/session/${t}/force-kill`,{method:"POST"})}async injectMessage(t,n){return this.apiCall(`/api/conversations/session/${t}/inject`,{method:"POST",body:JSON.stringify({message:n})})}getStreamUrl(t){return`/api/stream/${t}`}async getWorkingDirectories(){return this.apiCall("/api/working-directories")}async getPermissions(t){const n=new URLSearchParams;return t?.streamingId&&n.append("streamingId",t.streamingId),t?.status&&n.append("status",t.status),this.apiCall(`/api/permissions?${n}`)}async sendPermissionDecision(t,n){return this.apiCall(`/api/permissions/${t}/decision`,{method:"POST",body:JSON.stringify(n)})}async sendQuestionAnswer(t,n){return this.apiCall(`/api/questions/${t}/answer`,{method:"POST",body:JSON.stringify({answer:n})})}async updateSession(t,n){return this.apiCall(`/api/conversations/${t}/update`,{method:"PUT",body:JSON.stringify(n)})}async generateSessionName(t){return this.apiCall(`/api/conversations/${t}/generate-name`,{method:"POST"})}async getSessionInsights(t,n=!0){return this.apiCall(`/api/conversations/${t}/insights?quick=${n}`)}async listDirectory(t){const n=new URLSearchParams;return n.append("path",t.path),t.recursive!==void 0&&n.append("recursive",t.recursive.toString()),t.respectGitignore!==void 0&&n.append("respectGitignore",t.respectGitignore.toString()),this.apiCall(`/api/filesystem/list?${n}`)}async getCommands(t){const n=new URLSearchParams;return t&&n.append("workingDirectory",t),this.apiCall(`/api/system/commands?${n}`)}async getSystemStatus(){return this.apiCall("/api/system/status")}async getRecentLogs(t){const n=new URLSearchParams;return t!==void 0&&n.append("limit",t.toString()),this.apiCall(`/api/logs/recent?${n}`)}getLogStreamUrl(){return"/api/logs/stream"}async readFile(t){const n=new URLSearchParams;return n.append("path",t),this.apiCall(`/api/filesystem/read?${n}`)}async archiveAllSessions(){return this.apiCall("/api/conversations/archive-all",{method:"POST"})}async transcribeAudio(t,n){return this.apiCall("/api/gemini/transcribe",{method:"POST",body:JSON.stringify({audio:t,mimeType:n})})}async getGeminiHealth(){return this.apiCall("/api/gemini/health")}async getConfig(){return this.apiCall("/api/config")}async updateConfig(t){return this.apiCall("/api/config",{method:"PUT",body:JSON.stringify(t)})}async getWebPushStatus(){return this.apiCall("/api/notifications/status")}async registerWebPush(t){return this.apiCall("/api/notifications/register",{method:"POST",body:JSON.stringify(t)})}async unregisterWebPush(t){return this.apiCall("/api/notifications/unregister",{method:"POST",body:JSON.stringify({endpoint:t})})}async sendTestNotification(){return this.apiCall("/api/notifications/test",{method:"POST",body:JSON.stringify({})})}async fetchWithAuth(t,n){const s=Xi(),o={...n?.headers};return s&&(o.Authorization=`Bearer ${s}`),fetch(t,{...n,headers:o})}async refreshInsights(t=!1){const n=t?"/api/conversations/refresh?force=true":"/api/conversations/refresh";return this.apiCall(n,{method:"POST"})}async checkInsightsActivity(t,n,s){return this.apiCall("/api/conversations/activity-check",{method:"POST",body:JSON.stringify({sessionIds:t,knownMtimes:n,previouslyActiveSessionIds:s})})}async pulseRefreshInsights(t){return this.apiCall("/api/conversations/pulse",{method:"POST",body:JSON.stringify({sessionIds:t})})}async getClaudiaStatus(){return this.apiCall("/api/claudia/status")}async startClaudiaSession(){return this.apiCall("/api/claudia/start",{method:"POST"})}async sendClaudiaMessage(t){return this.apiCall("/api/claudia/message",{method:"POST",body:JSON.stringify({message:t})})}async stopClaudiaSession(){return this.apiCall("/api/claudia/stop",{method:"POST"})}async getClaudiaContext(){return this.apiCall("/api/claudia/context")}async getLicense(){return this.apiCall("/api/license")}async activateLicense(t){return this.apiCall("/api/license/activate",{method:"POST",body:JSON.stringify({token:t})})}async deactivateLicense(){return this.apiCall("/api/license/deactivate",{method:"POST"})}}const Ee=new F6;function Cg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nr(...e){return t=>{let n=!1;const s=e.map(o=>{const l=Cg(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<s.length;o++){const l=s[o];typeof l=="function"?l():Cg(e[o],null)}}}}function mt(...e){return d.useCallback(nr(...e),e)}var O6=Symbol.for("react.lazy"),cc=Tc[" use ".trim().toString()];function D6(e){return typeof e=="object"&&e!==null&&"then"in e}function Gx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===O6&&"_payload"in e&&D6(e._payload)}function Kx(e){const t=$6(e),n=d.forwardRef((s,o)=>{let{children:l,...c}=s;Gx(l)&&typeof cc=="function"&&(l=cc(l._payload));const f=d.Children.toArray(l),p=f.find(B6);if(p){const m=p.props.children,h=f.map(g=>g===p?d.Children.count(m)>1?d.Children.only(null):d.isValidElement(m)?m.props.children:null:g);return a.jsx(t,{...c,ref:o,children:d.isValidElement(m)?d.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var z6=Kx("Slot");function $6(e){const t=d.forwardRef((n,s)=>{let{children:o,...l}=n;if(Gx(o)&&typeof cc=="function"&&(o=cc(o._payload)),d.isValidElement(o)){const c=U6(o),f=V6(l,o.props);return o.type!==d.Fragment&&(f.ref=s?nr(s,c):c),d.cloneElement(o,f)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var H6=Symbol("radix.slottable");function B6(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===H6}function V6(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...f)=>{const p=l(...f);return o(...f),p}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function U6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Qx(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Qx(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function _c(){for(var e,t,n=0,s="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Qx(e))&&(s&&(s+=" "),s+=t);return s}const jg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Eg=_c,Z6=(e,t)=>n=>{var s;if(t?.variants==null)return Eg(e,n?.class,n?.className);const{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(m=>{const h=n?.[m],g=l?.[m];if(h===null)return null;const y=jg(h)||jg(g);return o[m][y]}),f=n&&Object.entries(n).reduce((m,h)=>{let[g,y]=h;return y===void 0||(m[g]=y),m},{}),p=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((m,h)=>{let{class:g,className:y,...b}=h;return Object.entries(b).every(k=>{let[w,S]=k;return Array.isArray(S)?S.includes({...l,...f}[w]):{...l,...f}[w]===S})?[...m,g,y]:m},[]);return Eg(e,c,p,n?.class,n?.className)},W6=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},q6=(e,t)=>({classGroupId:e,validator:t}),Yx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),uc="-",Ng=[],G6="arbitrary..",K6=e=>{const t=Y6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Q6(c);const f=c.split(uc),p=f[0]===""&&f.length>1?1:0;return Xx(f,p,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const p=s[c],m=n[c];return p?m?W6(m,p):p:m||Ng}return n[c]||Ng}}},Xx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const m=Xx(e,t+1,l);if(m)return m}const c=n.validators;if(c===null)return;const f=t===0?e.join(uc):e.slice(t).join(uc),p=c.length;for(let m=0;m<p;m++){const h=c[m];if(h.validator(f))return h.classGroupId}},Q6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?G6+s:void 0})(),Y6=e=>{const{theme:t,classGroups:n}=e;return X6(n,t)},X6=(e,t)=>{const n=Yx();for(const s in e){const o=e[s];Lp(o,n,s,t)}return n},Lp=(e,t,n,s)=>{const o=e.length;for(let l=0;l<o;l++){const c=e[l];J6(c,t,n,s)}},J6=(e,t,n,s)=>{if(typeof e=="string"){ek(e,t,n);return}if(typeof e=="function"){tk(e,t,n,s);return}nk(e,t,n,s)},ek=(e,t,n)=>{const s=e===""?t:Jx(t,e);s.classGroupId=n},tk=(e,t,n,s)=>{if(rk(e)){Lp(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(q6(n,e))},nk=(e,t,n,s)=>{const o=Object.entries(e),l=o.length;for(let c=0;c<l;c++){const[f,p]=o[c];Lp(p,Jx(t,f),n,s)}},Jx=(e,t)=>{let n=e;const s=t.split(uc),o=s.length;for(let l=0;l<o;l++){const c=s[l];let f=n.nextPart.get(c);f||(f=Yx(),n.nextPart.set(c,f)),n=f}return n},rk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const o=(l,c)=>{n[l]=c,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=s[l])!==void 0)return o(l,c),c},set(l,c){l in n?n[l]=c:o(l,c)}}},Gf="!",Ag=":",ik=[],Rg=(e,t,n,s,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),ok=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=o=>{const l=[];let c=0,f=0,p=0,m;const h=o.length;for(let w=0;w<h;w++){const S=o[w];if(c===0&&f===0){if(S===Ag){l.push(o.slice(p,w)),p=w+1;continue}if(S==="/"){m=w;continue}}S==="["?c++:S==="]"?c--:S==="("?f++:S===")"&&f--}const g=l.length===0?o:o.slice(p);let y=g,b=!1;g.endsWith(Gf)?(y=g.slice(0,-1),b=!0):g.startsWith(Gf)&&(y=g.slice(1),b=!0);const k=m&&m>p?m-p:void 0;return Rg(l,b,y,k)};if(t){const o=t+Ag,l=s;s=c=>c.startsWith(o)?l(c.slice(o.length)):Rg(ik,!1,c,void 0,!0)}if(n){const o=s;s=l=>n({className:l,parseClassName:o})}return s},ak=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let l=0;l<n.length;l++){const c=n[l],f=c[0]==="[",p=t.has(c);f||p?(o.length>0&&(o.sort(),s.push(...o),o=[]),s.push(c)):o.push(c)}return o.length>0&&(o.sort(),s.push(...o)),s}},lk=e=>({cache:sk(e.cacheSize),parseClassName:ok(e),sortModifiers:ak(e),...K6(e)}),ck=/\s+/,uk=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:l}=t,c=[],f=e.trim().split(ck);let p="";for(let m=f.length-1;m>=0;m-=1){const h=f[m],{isExternal:g,modifiers:y,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:w}=n(h);if(g){p=h+(p.length>0?" "+p:p);continue}let S=!!w,j=s(S?k.substring(0,w):k);if(!j){if(!S){p=h+(p.length>0?" "+p:p);continue}if(j=s(k),!j){p=h+(p.length>0?" "+p:p);continue}S=!1}const E=y.length===0?"":y.length===1?y[0]:l(y).join(":"),N=b?E+Gf:E,M=N+j;if(c.indexOf(M)>-1)continue;c.push(M);const _=o(j,S);for(let R=0;R<_.length;++R){const P=_[R];c.push(N+P)}p=h+(p.length>0?" "+p:p)}return p},dk=(...e)=>{let t=0,n,s,o="";for(;t<e.length;)(n=e[t++])&&(s=ey(n))&&(o&&(o+=" "),o+=s);return o},ey=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=ey(e[s]))&&(n&&(n+=" "),n+=t);return n},fk=(e,...t)=>{let n,s,o,l;const c=p=>{const m=t.reduce((h,g)=>g(h),e());return n=lk(m),s=n.cache.get,o=n.cache.set,l=f,f(p)},f=p=>{const m=s(p);if(m)return m;const h=uk(p,n);return o(p,h),h};return l=c,(...p)=>l(dk(...p))},pk=[],Ut=e=>{const t=n=>n[e]||pk;return t.isThemeGetter=!0,t},ty=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ny=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mk=/^\d+\/\d+$/,hk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=e=>mk.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Ss=e=>!!e&&Number.isInteger(Number(e)),lf=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),Kr=e=>hk.test(e),bk=()=>!0,wk=e=>gk.test(e)&&!xk.test(e),ry=()=>!1,kk=e=>yk.test(e),Sk=e=>vk.test(e),Ck=e=>!Te(e)&&!Ie(e),jk=e=>io(e,oy,ry),Te=e=>ty.test(e),Xs=e=>io(e,ay,wk),cf=e=>io(e,Tk,Qe),Tg=e=>io(e,sy,ry),Ek=e=>io(e,iy,Sk),Zl=e=>io(e,ly,kk),Ie=e=>ny.test(e),Qo=e=>oo(e,ay),Nk=e=>oo(e,Ik),Ig=e=>oo(e,sy),Ak=e=>oo(e,oy),Rk=e=>oo(e,iy),Wl=e=>oo(e,ly,!0),io=(e,t,n)=>{const s=ty.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},oo=(e,t,n=!1)=>{const s=ny.exec(e);return s?s[1]?t(s[1]):n:!1},sy=e=>e==="position"||e==="percentage",iy=e=>e==="image"||e==="url",oy=e=>e==="length"||e==="size"||e==="bg-size",ay=e=>e==="length",Tk=e=>e==="number",Ik=e=>e==="family-name",ly=e=>e==="shadow",Pk=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),s=Ut("font-weight"),o=Ut("tracking"),l=Ut("leading"),c=Ut("breakpoint"),f=Ut("container"),p=Ut("spacing"),m=Ut("radius"),h=Ut("shadow"),g=Ut("inset-shadow"),y=Ut("text-shadow"),b=Ut("drop-shadow"),k=Ut("blur"),w=Ut("perspective"),S=Ut("aspect"),j=Ut("ease"),E=Ut("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...M(),Ie,Te],R=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],L=()=>[Ie,Te,p],G=()=>[zi,"full","auto",...L()],D=()=>[Ss,"none","subgrid",Ie,Te],B=()=>["auto",{span:["full",Ss,Ie,Te]},Ss,Ie,Te],W=()=>[Ss,"auto",Ie,Te],Y=()=>["auto","min","max","fr",Ie,Te],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...L()],K=()=>[zi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],O=()=>[e,Ie,Te],J=()=>[...M(),Ig,Tg,{position:[Ie,Te]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",Ak,jk,{size:[Ie,Te]}],H=()=>[lf,Qo,Xs],I=()=>["","none","full",m,Ie,Te],ie=()=>["",Qe,Qo,Xs],se=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Qe,lf,Ig,Tg],oe=()=>["","none",k,Ie,Te],ce=()=>["none",Qe,Ie,Te],re=()=>["none",Qe,Ie,Te],ge=()=>[Qe,Ie,Te],be=()=>[zi,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kr],breakpoint:[Kr],color:[bk],container:[Kr],"drop-shadow":[Kr],ease:["in","out","in-out"],font:[Ck],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kr],shadow:[Kr],spacing:["px",Qe],text:[Kr],"text-shadow":[Kr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zi,Te,Ie,S]}],container:["container"],columns:[{columns:[Qe,Te,Ie,f]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{start:G()}],end:[{end:G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[Ss,"auto",Ie,Te]}],basis:[{basis:[zi,"full","auto",f,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,zi,"auto","initial","none",Te]}],grow:[{grow:["",Qe,Ie,Te]}],shrink:[{shrink:["",Qe,Ie,Te]}],order:[{order:[Ss,"first","last","none",Ie,Te]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[f,"screen",...K()]}],"min-w":[{"min-w":[f,"screen","none",...K()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",n,Qo,Xs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ie,cf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",lf,Te]}],"font-family":[{font:[Nk,Te,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ie,Te]}],"line-clamp":[{"line-clamp":[Qe,"none",Ie,cf]}],leading:[{leading:[l,...L()]}],"list-image":[{"list-image":["none",Ie,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",Ie,Xs]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Qe,"auto",Ie,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ss,Ie,Te],radial:["",Ie,Te],conic:[Ss,Ie,Te]},Rk,Ek]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,Ie,Te]}],"outline-w":[{outline:["",Qe,Qo,Xs]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",h,Wl,Zl]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",g,Wl,Zl]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Qe,Xs]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",y,Wl,Zl]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Qe,Ie,Te]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Ie,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Te]}],filter:[{filter:["","none",Ie,Te]}],blur:[{blur:oe()}],brightness:[{brightness:[Qe,Ie,Te]}],contrast:[{contrast:[Qe,Ie,Te]}],"drop-shadow":[{"drop-shadow":["","none",b,Wl,Zl]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Qe,Ie,Te]}],"hue-rotate":[{"hue-rotate":[Qe,Ie,Te]}],invert:[{invert:["",Qe,Ie,Te]}],saturate:[{saturate:[Qe,Ie,Te]}],sepia:[{sepia:["",Qe,Ie,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Te]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,Ie,Te]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,Ie,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,Ie,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,Ie,Te]}],"backdrop-invert":[{"backdrop-invert":["",Qe,Ie,Te]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,Ie,Te]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,Ie,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,Ie,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",Ie,Te]}],ease:[{ease:["linear","initial",j,Ie,Te]}],delay:[{delay:[Qe,Ie,Te]}],animate:[{animate:["none",E,Ie,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ie,Te]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[Ie,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie,Te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie,Te]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Qe,Qo,Xs,cf]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Mk=fk(Pk);function Ne(...e){return Mk(_c(e))}const _k=Z6("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Oe=d.forwardRef(({className:e,variant:t,size:n,asChild:s=!1,...o},l)=>{const c=s?z6:"button";return a.jsx(c,{className:Ne(_k({variant:t,size:n,className:e})),ref:l,...o})});Oe.displayName="Button";function Mt({className:e,type:t,...n}){return a.jsx("input",{type:t,"data-slot":"input",className:Ne("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function Lk({isVisible:e,onToggle:t}){const[n,s]=d.useState([]),[o,l]=d.useState(""),[c,f]=d.useState(!1),p=d.useRef(null),m=d.useRef(null);d.useEffect(()=>(e&&!m.current&&h(),()=>{m.current&&(m.current.cancel(),m.current=null)}),[e]);const h=async()=>{try{try{const j=await Ee.getRecentLogs(100);j.logs&&s(j.logs)}catch(j){console.error("Failed to get recent logs:",j)}const b=await Ee.fetchWithAuth(Ee.getLogStreamUrl());if(!b.ok){console.error("Failed to connect to log stream");return}const k=b.body.getReader(),w=new TextDecoder;m.current=k,f(!0);let S="";for(;;){const{done:j,value:E}=await k.read();if(j)break;const N=w.decode(E,{stream:!0});S+=N;const M=S.split(`
|
|
9
|
+
`);S=M.pop()||"";for(const _ of M)if(_.trim()&&_.startsWith("data: ")){const R=_.substring(6);s(P=>[...P,R])}}}catch(b){console.error("Log stream error:",b)}finally{f(!1),m.current=null}},g=b=>{const k=!o||b.toLowerCase().includes(o.toLowerCase());try{const w=JSON.parse(b),{level:S,time:j,component:E,msg:N,pid:M,hostname:_,requestId:R,...P}=w,L=j?new Date(j).toLocaleTimeString():"",D={debug:"text-neutral-500",info:"text-green-400",warn:"text-yellow-300",error:"text-red-400",fatal:"text-red-600"}[S]||"text-neutral-300";return{formatted:a.jsxs("div",{className:"flex items-baseline gap-2 py-0.5 border-b border-neutral-700",children:[a.jsx("span",{className:"text-neutral-500 text-[11px]",children:L}),a.jsxs("span",{className:Ne("font-bold text-[11px]",D),children:["[",S?.toUpperCase()||"LOG","]"]}),E&&a.jsxs("span",{className:"text-blue-400 text-[11px]",children:["[",E,"]"]}),a.jsx("span",{className:"flex-1 text-neutral-300",children:N}),R&&a.jsxs("span",{className:"text-neutral-500 text-[11px]",children:[" (req: ",R,")"]}),Object.keys(P).length>0&&a.jsxs("span",{className:"text-neutral-500 text-[11px]",children:[" ",JSON.stringify(P)]})]}),matchesFilter:k}}catch{return{formatted:a.jsx("div",{className:"text-neutral-300 border-0",children:b}),matchesFilter:k}}},y=n.map((b,k)=>{const{formatted:w,matchesFilter:S}=g(b);return S?a.jsx("div",{className:"my-0.5",children:w},k):null}).filter(Boolean);return a.jsxs("div",{className:Ne("flex flex-col border-t-2 border-neutral-300 bg-neutral-900",e?"absolute top-0 left-0 right-0 bottom-0 h-full z-[100]":"h-10"),children:[a.jsxs("div",{className:"flex items-center p-2.5 bg-neutral-800 border-b border-neutral-600 gap-2.5",children:[a.jsxs(Oe,{className:"bg-neutral-700 hover:bg-neutral-600 text-white border-0 py-1 px-4 text-xs rounded h-auto",onClick:t,"aria-label":e?"Collapse log monitor":"Expand log monitor",children:[e?"▼":"▲"," Logs"]}),a.jsx(Mt,{type:"text",className:"flex-1 bg-neutral-900 text-neutral-300 border border-neutral-600 py-1 px-2.5 text-xs rounded disabled:opacity-50 disabled:cursor-not-allowed",placeholder:"Filter logs...",value:o,onChange:b=>l(b.target.value),disabled:!e,"aria-label":"Filter log entries"}),a.jsx(Oe,{className:"bg-neutral-700 hover:bg-neutral-600 text-white border-0 py-1 px-4 text-xs rounded h-auto disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>s([]),disabled:!e,"aria-label":"Clear all log entries",children:"Clear"}),a.jsx("span",{className:Ne("text-xs",c?"text-green-400":"text-neutral-500"),children:c?"● Connected":"○ Disconnected"})]}),e&&a.jsx("div",{className:"flex-1 overflow-y-auto p-2.5 bg-neutral-900 text-neutral-300 font-mono text-xs leading-relaxed min-h-0",ref:p,children:y.length>0?y:a.jsx("div",{className:"text-neutral-500 text-center py-5",children:"No logs to display"})})]})}const Es=d.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:Ne("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Es.displayName="Textarea";function Pg(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Fk(e,t){const n=d.createContext(t),s=l=>{const{children:c,...f}=l,p=d.useMemo(()=>f,Object.values(f));return a.jsx(n.Provider,{value:p,children:c})};s.displayName=e+"Provider";function o(l){const c=d.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[s,o]}function Rr(e,t=[]){let n=[];function s(l,c){const f=d.createContext(c),p=n.length;n=[...n,c];const m=g=>{const{scope:y,children:b,...k}=g,w=y?.[e]?.[p]||f,S=d.useMemo(()=>k,Object.values(k));return a.jsx(w.Provider,{value:S,children:b})};m.displayName=l+"Provider";function h(g,y){const b=y?.[e]?.[p]||f,k=d.useContext(b);if(k)return k;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[m,h]}const o=()=>{const l=n.map(c=>d.createContext(c));return function(f){const p=f?.[e]||l;return d.useMemo(()=>({[`__scope${e}`]:{...f,[e]:p}}),[f,p])}};return o.scopeName=e,[s,Ok(o,...t)]}function Ok(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const c=s.reduce((f,{useScope:p,scopeName:m})=>{const g=p(l)[`__scope${m}`];return{...f,...g}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Mg(e){const t=Dk(e),n=d.forwardRef((s,o)=>{const{children:l,...c}=s,f=d.Children.toArray(l),p=f.find($k);if(p){const m=p.props.children,h=f.map(g=>g===p?d.Children.count(m)>1?d.Children.only(null):d.isValidElement(m)?m.props.children:null:g);return a.jsx(t,{...c,ref:o,children:d.isValidElement(m)?d.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function Dk(e){const t=d.forwardRef((n,s)=>{const{children:o,...l}=n;if(d.isValidElement(o)){const c=Bk(o),f=Hk(l,o.props);return o.type!==d.Fragment&&(f.ref=s?nr(s,c):c),d.cloneElement(o,f)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zk=Symbol("radix.slottable");function $k(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zk}function Hk(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...f)=>{const p=l(...f);return o(...f),p}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function Bk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function cy(e){const t=e+"CollectionProvider",[n,s]=Rr(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=w=>{const{scope:S,children:j}=w,E=jn.useRef(null),N=jn.useRef(new Map).current;return a.jsx(o,{scope:S,itemMap:N,collectionRef:E,children:j})};c.displayName=t;const f=e+"CollectionSlot",p=Mg(f),m=jn.forwardRef((w,S)=>{const{scope:j,children:E}=w,N=l(f,j),M=mt(S,N.collectionRef);return a.jsx(p,{ref:M,children:E})});m.displayName=f;const h=e+"CollectionItemSlot",g="data-radix-collection-item",y=Mg(h),b=jn.forwardRef((w,S)=>{const{scope:j,children:E,...N}=w,M=jn.useRef(null),_=mt(S,M),R=l(h,j);return jn.useEffect(()=>(R.itemMap.set(M,{ref:M,...N}),()=>{R.itemMap.delete(M)})),a.jsx(y,{[g]:"",ref:_,children:E})});b.displayName=h;function k(w){const S=l(e+"CollectionConsumer",w);return jn.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const N=Array.from(E.querySelectorAll(`[${g}]`));return Array.from(S.itemMap.values()).sort((R,P)=>N.indexOf(R.ref.current)-N.indexOf(P.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:c,Slot:m,ItemSlot:b},k,s]}var Vk=d.createContext(void 0);function Fp(e){const t=d.useContext(Vk);return e||t||"ltr"}function Uk(e){const t=Zk(e),n=d.forwardRef((s,o)=>{const{children:l,...c}=s,f=d.Children.toArray(l),p=f.find(qk);if(p){const m=p.props.children,h=f.map(g=>g===p?d.Children.count(m)>1?d.Children.only(null):d.isValidElement(m)?m.props.children:null:g);return a.jsx(t,{...c,ref:o,children:d.isValidElement(m)?d.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function Zk(e){const t=d.forwardRef((n,s)=>{const{children:o,...l}=n;if(d.isValidElement(o)){const c=Kk(o),f=Gk(l,o.props);return o.type!==d.Fragment&&(f.ref=s?nr(s,c):c),d.cloneElement(o,f)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wk=Symbol("radix.slottable");function qk(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wk}function Gk(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...f)=>{const p=l(...f);return o(...f),p}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function Kk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=Qk.reduce((e,t)=>{const n=Uk(`Primitive.${t}`),s=d.forwardRef((o,l)=>{const{asChild:c,...f}=o,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(p,{...f,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function Yk(e,t){e&&Ea.flushSync(()=>e.dispatchEvent(t))}function Is(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>t.current?.(...n),[])}function Xk(e,t=globalThis?.document){const n=Is(e);d.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var Jk="DismissableLayer",Kf="dismissableLayer.update",e3="dismissableLayer.pointerDownOutside",t3="dismissableLayer.focusOutside",_g,uy=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Na=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...p}=e,m=d.useContext(uy),[h,g]=d.useState(null),y=h?.ownerDocument??globalThis?.document,[,b]=d.useState({}),k=mt(t,P=>g(P)),w=Array.from(m.layers),[S]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=w.indexOf(S),E=h?w.indexOf(h):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,M=E>=j,_=s3(P=>{const L=P.target,G=[...m.branches].some(D=>D.contains(L));!M||G||(o?.(P),c?.(P),P.defaultPrevented||f?.())},y),R=i3(P=>{const L=P.target;[...m.branches].some(D=>D.contains(L))||(l?.(P),c?.(P),P.defaultPrevented||f?.())},y);return Xk(P=>{E===m.layers.size-1&&(s?.(P),!P.defaultPrevented&&f&&(P.preventDefault(),f()))},y),d.useEffect(()=>{if(h)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(_g=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),Lg(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=_g)}},[h,y,n,m]),d.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),Lg())},[h,m]),d.useEffect(()=>{const P=()=>b({});return document.addEventListener(Kf,P),()=>document.removeEventListener(Kf,P)},[]),a.jsx(He.div,{...p,ref:k,style:{pointerEvents:N?M?"auto":"none":void 0,...e.style},onFocusCapture:Ve(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ve(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ve(e.onPointerDownCapture,_.onPointerDownCapture)})});Na.displayName=Jk;var n3="DismissableLayerBranch",r3=d.forwardRef((e,t)=>{const n=d.useContext(uy),s=d.useRef(null),o=mt(t,s);return d.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),a.jsx(He.div,{...e,ref:o})});r3.displayName=n3;function s3(e,t=globalThis?.document){const n=Is(e),s=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const l=f=>{if(f.target&&!s.current){let p=function(){dy(e3,n,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=p,t.addEventListener("click",o.current,{once:!0})):p()}else t.removeEventListener("click",o.current);s.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function i3(e,t=globalThis?.document){const n=Is(e),s=d.useRef(!1);return d.useEffect(()=>{const o=l=>{l.target&&!s.current&&dy(t3,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Lg(){const e=new CustomEvent(Kf);document.dispatchEvent(e)}function dy(e,t,n,{discrete:s}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?Yk(o,l):o.dispatchEvent(l)}var uf=0;function Op(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fg()),document.body.insertAdjacentElement("beforeend",e[1]??Fg()),uf++,()=>{uf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),uf--}},[])}function Fg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var df="focusScope.autoFocusOnMount",ff="focusScope.autoFocusOnUnmount",Og={bubbles:!1,cancelable:!0},o3="FocusScope",Lc=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...c}=e,[f,p]=d.useState(null),m=Is(o),h=Is(l),g=d.useRef(null),y=mt(t,w=>p(w)),b=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(s){let w=function(N){if(b.paused||!f)return;const M=N.target;f.contains(M)?g.current=M:js(g.current,{select:!0})},S=function(N){if(b.paused||!f)return;const M=N.relatedTarget;M!==null&&(f.contains(M)||js(g.current,{select:!0}))},j=function(N){if(document.activeElement===document.body)for(const _ of N)_.removedNodes.length>0&&js(f)};document.addEventListener("focusin",w),document.addEventListener("focusout",S);const E=new MutationObserver(j);return f&&E.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",S),E.disconnect()}}},[s,f,b.paused]),d.useEffect(()=>{if(f){zg.add(b);const w=document.activeElement;if(!f.contains(w)){const j=new CustomEvent(df,Og);f.addEventListener(df,m),f.dispatchEvent(j),j.defaultPrevented||(a3(f3(fy(f)),{select:!0}),document.activeElement===w&&js(f))}return()=>{f.removeEventListener(df,m),setTimeout(()=>{const j=new CustomEvent(ff,Og);f.addEventListener(ff,h),f.dispatchEvent(j),j.defaultPrevented||js(w??document.body,{select:!0}),f.removeEventListener(ff,h),zg.remove(b)},0)}}},[f,m,h,b]);const k=d.useCallback(w=>{if(!n&&!s||b.paused)return;const S=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,j=document.activeElement;if(S&&j){const E=w.currentTarget,[N,M]=l3(E);N&&M?!w.shiftKey&&j===M?(w.preventDefault(),n&&js(N,{select:!0})):w.shiftKey&&j===N&&(w.preventDefault(),n&&js(M,{select:!0})):j===E&&w.preventDefault()}},[n,s,b.paused]);return a.jsx(He.div,{tabIndex:-1,...c,ref:y,onKeyDown:k})});Lc.displayName=o3;function a3(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(js(s,{select:t}),document.activeElement!==n)return}function l3(e){const t=fy(e),n=Dg(t,e),s=Dg(t.reverse(),e);return[n,s]}function fy(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dg(e,t){for(const n of e)if(!c3(n,{upTo:t}))return n}function c3(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function u3(e){return e instanceof HTMLInputElement&&"select"in e}function js(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&u3(e)&&t&&e.select()}}var zg=d3();function d3(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=$g(e,t),e.unshift(t)},remove(t){e=$g(e,t),e[0]?.resume()}}}function $g(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function f3(e){return e.filter(t=>t.tagName!=="A")}var tn=globalThis?.document?d.useLayoutEffect:()=>{},p3=Tc[" useId ".trim().toString()]||(()=>{}),m3=0;function en(e){const[t,n]=d.useState(p3());return tn(()=>{n(s=>s??String(m3++))},[e]),t?`radix-${t}`:""}const h3=["top","right","bottom","left"],Ps=Math.min,Dn=Math.max,dc=Math.round,ql=Math.floor,Er=e=>({x:e,y:e}),g3={left:"right",right:"left",bottom:"top",top:"bottom"},x3={start:"end",end:"start"};function Qf(e,t,n){return Dn(e,Ps(t,n))}function Xr(e,t){return typeof e=="function"?e(t):e}function Jr(e){return e.split("-")[0]}function ao(e){return e.split("-")[1]}function Dp(e){return e==="x"?"y":"x"}function zp(e){return e==="y"?"height":"width"}const y3=new Set(["top","bottom"]);function jr(e){return y3.has(Jr(e))?"y":"x"}function $p(e){return Dp(jr(e))}function v3(e,t,n){n===void 0&&(n=!1);const s=ao(e),o=$p(e),l=zp(o);let c=o==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=fc(c)),[c,fc(c)]}function b3(e){const t=fc(e);return[Yf(e),t,Yf(t)]}function Yf(e){return e.replace(/start|end/g,t=>x3[t])}const Hg=["left","right"],Bg=["right","left"],w3=["top","bottom"],k3=["bottom","top"];function S3(e,t,n){switch(e){case"top":case"bottom":return n?t?Bg:Hg:t?Hg:Bg;case"left":case"right":return t?w3:k3;default:return[]}}function C3(e,t,n,s){const o=ao(e);let l=S3(Jr(e),n==="start",s);return o&&(l=l.map(c=>c+"-"+o),t&&(l=l.concat(l.map(Yf)))),l}function fc(e){return e.replace(/left|right|bottom|top/g,t=>g3[t])}function j3(e){return{top:0,right:0,bottom:0,left:0,...e}}function py(e){return typeof e!="number"?j3(e):{top:e,right:e,bottom:e,left:e}}function pc(e){const{x:t,y:n,width:s,height:o}=e;return{width:s,height:o,top:n,left:t,right:t+s,bottom:n+o,x:t,y:n}}function Vg(e,t,n){let{reference:s,floating:o}=e;const l=jr(t),c=$p(t),f=zp(c),p=Jr(t),m=l==="y",h=s.x+s.width/2-o.width/2,g=s.y+s.height/2-o.height/2,y=s[f]/2-o[f]/2;let b;switch(p){case"top":b={x:h,y:s.y-o.height};break;case"bottom":b={x:h,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:g};break;case"left":b={x:s.x-o.width,y:g};break;default:b={x:s.x,y:s.y}}switch(ao(t)){case"start":b[c]-=y*(n&&m?-1:1);break;case"end":b[c]+=y*(n&&m?-1:1);break}return b}const E3=async(e,t,n)=>{const{placement:s="bottom",strategy:o="absolute",middleware:l=[],platform:c}=n,f=l.filter(Boolean),p=await(c.isRTL==null?void 0:c.isRTL(t));let m=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:g}=Vg(m,s,p),y=s,b={},k=0;for(let w=0;w<f.length;w++){const{name:S,fn:j}=f[w],{x:E,y:N,data:M,reset:_}=await j({x:h,y:g,initialPlacement:s,placement:y,strategy:o,middlewareData:b,rects:m,platform:c,elements:{reference:e,floating:t}});h=E??h,g=N??g,b={...b,[S]:{...b[S],...M}},_&&k<=50&&(k++,typeof _=="object"&&(_.placement&&(y=_.placement),_.rects&&(m=_.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:h,y:g}=Vg(m,y,p)),w=-1)}return{x:h,y:g,placement:y,strategy:o,middlewareData:b}};async function pa(e,t){var n;t===void 0&&(t={});const{x:s,y:o,platform:l,rects:c,elements:f,strategy:p}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:y=!1,padding:b=0}=Xr(t,e),k=py(b),S=f[y?g==="floating"?"reference":"floating":g],j=pc(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(S)))==null||n?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:m,rootBoundary:h,strategy:p})),E=g==="floating"?{x:s,y:o,width:c.floating.width,height:c.floating.height}:c.reference,N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),M=await(l.isElement==null?void 0:l.isElement(N))?await(l.getScale==null?void 0:l.getScale(N))||{x:1,y:1}:{x:1,y:1},_=pc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:E,offsetParent:N,strategy:p}):E);return{top:(j.top-_.top+k.top)/M.y,bottom:(_.bottom-j.bottom+k.bottom)/M.y,left:(j.left-_.left+k.left)/M.x,right:(_.right-j.right+k.right)/M.x}}const N3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:o,rects:l,platform:c,elements:f,middlewareData:p}=t,{element:m,padding:h=0}=Xr(e,t)||{};if(m==null)return{};const g=py(h),y={x:n,y:s},b=$p(o),k=zp(b),w=await c.getDimensions(m),S=b==="y",j=S?"top":"left",E=S?"bottom":"right",N=S?"clientHeight":"clientWidth",M=l.reference[k]+l.reference[b]-y[b]-l.floating[k],_=y[b]-l.reference[b],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let P=R?R[N]:0;(!P||!await(c.isElement==null?void 0:c.isElement(R)))&&(P=f.floating[N]||l.floating[k]);const L=M/2-_/2,G=P/2-w[k]/2-1,D=Ps(g[j],G),B=Ps(g[E],G),W=D,Y=P-w[k]-B,Q=P/2-w[k]/2+L,F=Qf(W,Q,Y),Z=!p.arrow&&ao(o)!=null&&Q!==F&&l.reference[k]/2-(Q<W?D:B)-w[k]/2<0,K=Z?Q<W?Q-W:Q-Y:0;return{[b]:y[b]+K,data:{[b]:F,centerOffset:Q-F-K,...Z&&{alignmentOffset:K}},reset:Z}}}),A3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:o,middlewareData:l,rects:c,initialPlacement:f,platform:p,elements:m}=t,{mainAxis:h=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:w=!0,...S}=Xr(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const j=Jr(o),E=jr(f),N=Jr(f)===f,M=await(p.isRTL==null?void 0:p.isRTL(m.floating)),_=y||(N||!w?[fc(f)]:b3(f)),R=k!=="none";!y&&R&&_.push(...C3(f,w,k,M));const P=[f,..._],L=await pa(t,S),G=[];let D=((s=l.flip)==null?void 0:s.overflows)||[];if(h&&G.push(L[j]),g){const Q=v3(o,c,M);G.push(L[Q[0]],L[Q[1]])}if(D=[...D,{placement:o,overflows:G}],!G.every(Q=>Q<=0)){var B,W;const Q=(((B=l.flip)==null?void 0:B.index)||0)+1,F=P[Q];if(F&&(!(g==="alignment"?E!==jr(F):!1)||D.every(O=>jr(O.placement)===E?O.overflows[0]>0:!0)))return{data:{index:Q,overflows:D},reset:{placement:F}};let Z=(W=D.filter(K=>K.overflows[0]<=0).sort((K,O)=>K.overflows[1]-O.overflows[1])[0])==null?void 0:W.placement;if(!Z)switch(b){case"bestFit":{var Y;const K=(Y=D.filter(O=>{if(R){const J=jr(O.placement);return J===E||J==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(J=>J>0).reduce((J,T)=>J+T,0)]).sort((O,J)=>O[1]-J[1])[0])==null?void 0:Y[0];K&&(Z=K);break}case"initialPlacement":Z=f;break}if(o!==Z)return{reset:{placement:Z}}}return{}}}};function Ug(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zg(e){return h3.some(t=>e[t]>=0)}const R3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...o}=Xr(e,t);switch(s){case"referenceHidden":{const l=await pa(t,{...o,elementContext:"reference"}),c=Ug(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Zg(c)}}}case"escaped":{const l=await pa(t,{...o,altBoundary:!0}),c=Ug(l,n.floating);return{data:{escapedOffsets:c,escaped:Zg(c)}}}default:return{}}}}},my=new Set(["left","top"]);async function T3(e,t){const{placement:n,platform:s,elements:o}=e,l=await(s.isRTL==null?void 0:s.isRTL(o.floating)),c=Jr(n),f=ao(n),p=jr(n)==="y",m=my.has(c)?-1:1,h=l&&p?-1:1,g=Xr(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:k}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof k=="number"&&(b=f==="end"?k*-1:k),p?{x:b*h,y:y*m}:{x:y*m,y:b*h}}const I3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:o,y:l,placement:c,middlewareData:f}=t,p=await T3(t,e);return c===((n=f.offset)==null?void 0:n.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:o+p.x,y:l+p.y,data:{...p,placement:c}}}}},P3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:S=>{let{x:j,y:E}=S;return{x:j,y:E}}},...p}=Xr(e,t),m={x:n,y:s},h=await pa(t,p),g=jr(Jr(o)),y=Dp(g);let b=m[y],k=m[g];if(l){const S=y==="y"?"top":"left",j=y==="y"?"bottom":"right",E=b+h[S],N=b-h[j];b=Qf(E,b,N)}if(c){const S=g==="y"?"top":"left",j=g==="y"?"bottom":"right",E=k+h[S],N=k-h[j];k=Qf(E,k,N)}const w=f.fn({...t,[y]:b,[g]:k});return{...w,data:{x:w.x-n,y:w.y-s,enabled:{[y]:l,[g]:c}}}}}},M3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:o,rects:l,middlewareData:c}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=Xr(e,t),h={x:n,y:s},g=jr(o),y=Dp(g);let b=h[y],k=h[g];const w=Xr(f,t),S=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(p){const N=y==="y"?"height":"width",M=l.reference[y]-l.floating[N]+S.mainAxis,_=l.reference[y]+l.reference[N]-S.mainAxis;b<M?b=M:b>_&&(b=_)}if(m){var j,E;const N=y==="y"?"width":"height",M=my.has(Jr(o)),_=l.reference[g]-l.floating[N]+(M&&((j=c.offset)==null?void 0:j[g])||0)+(M?0:S.crossAxis),R=l.reference[g]+l.reference[N]+(M?0:((E=c.offset)==null?void 0:E[g])||0)-(M?S.crossAxis:0);k<_?k=_:k>R&&(k=R)}return{[y]:b,[g]:k}}}},_3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:o,rects:l,platform:c,elements:f}=t,{apply:p=()=>{},...m}=Xr(e,t),h=await pa(t,m),g=Jr(o),y=ao(o),b=jr(o)==="y",{width:k,height:w}=l.floating;let S,j;g==="top"||g==="bottom"?(S=g,j=y===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(j=g,S=y==="end"?"top":"bottom");const E=w-h.top-h.bottom,N=k-h.left-h.right,M=Ps(w-h[S],E),_=Ps(k-h[j],N),R=!t.middlewareData.shift;let P=M,L=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=N),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(P=E),R&&!y){const D=Dn(h.left,0),B=Dn(h.right,0),W=Dn(h.top,0),Y=Dn(h.bottom,0);b?L=k-2*(D!==0||B!==0?D+B:Dn(h.left,h.right)):P=w-2*(W!==0||Y!==0?W+Y:Dn(h.top,h.bottom))}await p({...t,availableWidth:L,availableHeight:P});const G=await c.getDimensions(f.floating);return k!==G.width||w!==G.height?{reset:{rects:!0}}:{}}}};function Fc(){return typeof window<"u"}function lo(e){return hy(e)?(e.nodeName||"").toLowerCase():"#document"}function zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tr(e){var t;return(t=(hy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hy(e){return Fc()?e instanceof Node||e instanceof zn(e).Node:!1}function gr(e){return Fc()?e instanceof Element||e instanceof zn(e).Element:!1}function Ar(e){return Fc()?e instanceof HTMLElement||e instanceof zn(e).HTMLElement:!1}function Wg(e){return!Fc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zn(e).ShadowRoot}const L3=new Set(["inline","contents"]);function Aa(e){const{overflow:t,overflowX:n,overflowY:s,display:o}=xr(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!L3.has(o)}const F3=new Set(["table","td","th"]);function O3(e){return F3.has(lo(e))}const D3=[":popover-open",":modal"];function Oc(e){return D3.some(t=>{try{return e.matches(t)}catch{return!1}})}const z3=["transform","translate","scale","rotate","perspective"],$3=["transform","translate","scale","rotate","perspective","filter"],H3=["paint","layout","strict","content"];function Hp(e){const t=Bp(),n=gr(e)?xr(e):e;return z3.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||$3.some(s=>(n.willChange||"").includes(s))||H3.some(s=>(n.contain||"").includes(s))}function B3(e){let t=Ms(e);for(;Ar(t)&&!Ji(t);){if(Hp(t))return t;if(Oc(t))return null;t=Ms(t)}return null}function Bp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const V3=new Set(["html","body","#document"]);function Ji(e){return V3.has(lo(e))}function xr(e){return zn(e).getComputedStyle(e)}function Dc(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ms(e){if(lo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wg(e)&&e.host||Tr(e);return Wg(t)?t.host:t}function gy(e){const t=Ms(e);return Ji(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&Aa(t)?t:gy(t)}function ma(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gy(e),l=o===((s=e.ownerDocument)==null?void 0:s.body),c=zn(o);if(l){const f=Xf(c);return t.concat(c,c.visualViewport||[],Aa(o)?o:[],f&&n?ma(f):[])}return t.concat(o,ma(o,[],n))}function Xf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xy(e){const t=xr(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const o=Ar(e),l=o?e.offsetWidth:n,c=o?e.offsetHeight:s,f=dc(n)!==l||dc(s)!==c;return f&&(n=l,s=c),{width:n,height:s,$:f}}function Vp(e){return gr(e)?e:e.contextElement}function Gi(e){const t=Vp(e);if(!Ar(t))return Er(1);const n=t.getBoundingClientRect(),{width:s,height:o,$:l}=xy(t);let c=(l?dc(n.width):n.width)/s,f=(l?dc(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const U3=Er(0);function yy(e){const t=zn(e);return!Bp()||!t.visualViewport?U3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Z3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zn(e)?!1:t}function ni(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Vp(e);let c=Er(1);t&&(s?gr(s)&&(c=Gi(s)):c=Gi(e));const f=Z3(l,n,s)?yy(l):Er(0);let p=(o.left+f.x)/c.x,m=(o.top+f.y)/c.y,h=o.width/c.x,g=o.height/c.y;if(l){const y=zn(l),b=s&&gr(s)?zn(s):s;let k=y,w=Xf(k);for(;w&&s&&b!==k;){const S=Gi(w),j=w.getBoundingClientRect(),E=xr(w),N=j.left+(w.clientLeft+parseFloat(E.paddingLeft))*S.x,M=j.top+(w.clientTop+parseFloat(E.paddingTop))*S.y;p*=S.x,m*=S.y,h*=S.x,g*=S.y,p+=N,m+=M,k=zn(w),w=Xf(k)}}return pc({width:h,height:g,x:p,y:m})}function zc(e,t){const n=Dc(e).scrollLeft;return t?t.left+n:ni(Tr(e)).left+n}function vy(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-zc(e,n),o=n.top+t.scrollTop;return{x:s,y:o}}function W3(e){let{elements:t,rect:n,offsetParent:s,strategy:o}=e;const l=o==="fixed",c=Tr(s),f=t?Oc(t.floating):!1;if(s===c||f&&l)return n;let p={scrollLeft:0,scrollTop:0},m=Er(1);const h=Er(0),g=Ar(s);if((g||!g&&!l)&&((lo(s)!=="body"||Aa(c))&&(p=Dc(s)),Ar(s))){const b=ni(s);m=Gi(s),h.x=b.x+s.clientLeft,h.y=b.y+s.clientTop}const y=c&&!g&&!l?vy(c,p):Er(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-p.scrollLeft*m.x+h.x+y.x,y:n.y*m.y-p.scrollTop*m.y+h.y+y.y}}function q3(e){return Array.from(e.getClientRects())}function G3(e){const t=Tr(e),n=Dc(e),s=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),l=Dn(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let c=-n.scrollLeft+zc(e);const f=-n.scrollTop;return xr(s).direction==="rtl"&&(c+=Dn(t.clientWidth,s.clientWidth)-o),{width:o,height:l,x:c,y:f}}const qg=25;function K3(e,t){const n=zn(e),s=Tr(e),o=n.visualViewport;let l=s.clientWidth,c=s.clientHeight,f=0,p=0;if(o){l=o.width,c=o.height;const h=Bp();(!h||h&&t==="fixed")&&(f=o.offsetLeft,p=o.offsetTop)}const m=zc(s);if(m<=0){const h=s.ownerDocument,g=h.body,y=getComputedStyle(g),b=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,k=Math.abs(s.clientWidth-g.clientWidth-b);k<=qg&&(l-=k)}else m<=qg&&(l+=m);return{width:l,height:c,x:f,y:p}}const Q3=new Set(["absolute","fixed"]);function Y3(e,t){const n=ni(e,!0,t==="fixed"),s=n.top+e.clientTop,o=n.left+e.clientLeft,l=Ar(e)?Gi(e):Er(1),c=e.clientWidth*l.x,f=e.clientHeight*l.y,p=o*l.x,m=s*l.y;return{width:c,height:f,x:p,y:m}}function Gg(e,t,n){let s;if(t==="viewport")s=K3(e,n);else if(t==="document")s=G3(Tr(e));else if(gr(t))s=Y3(t,n);else{const o=yy(e);s={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pc(s)}function by(e,t){const n=Ms(e);return n===t||!gr(n)||Ji(n)?!1:xr(n).position==="fixed"||by(n,t)}function X3(e,t){const n=t.get(e);if(n)return n;let s=ma(e,[],!1).filter(f=>gr(f)&&lo(f)!=="body"),o=null;const l=xr(e).position==="fixed";let c=l?Ms(e):e;for(;gr(c)&&!Ji(c);){const f=xr(c),p=Hp(c);!p&&f.position==="fixed"&&(o=null),(l?!p&&!o:!p&&f.position==="static"&&!!o&&Q3.has(o.position)||Aa(c)&&!p&&by(e,c))?s=s.filter(h=>h!==c):o=f,c=Ms(c)}return t.set(e,s),s}function J3(e){let{element:t,boundary:n,rootBoundary:s,strategy:o}=e;const c=[...n==="clippingAncestors"?Oc(t)?[]:X3(t,this._c):[].concat(n),s],f=c[0],p=c.reduce((m,h)=>{const g=Gg(t,h,o);return m.top=Dn(g.top,m.top),m.right=Ps(g.right,m.right),m.bottom=Ps(g.bottom,m.bottom),m.left=Dn(g.left,m.left),m},Gg(t,f,o));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function e5(e){const{width:t,height:n}=xy(e);return{width:t,height:n}}function t5(e,t,n){const s=Ar(t),o=Tr(t),l=n==="fixed",c=ni(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const p=Er(0);function m(){p.x=zc(o)}if(s||!s&&!l)if((lo(t)!=="body"||Aa(o))&&(f=Dc(t)),s){const b=ni(t,!0,l,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else o&&m();l&&!s&&o&&m();const h=o&&!s&&!l?vy(o,f):Er(0),g=c.left+f.scrollLeft-p.x-h.x,y=c.top+f.scrollTop-p.y-h.y;return{x:g,y,width:c.width,height:c.height}}function pf(e){return xr(e).position==="static"}function Kg(e,t){if(!Ar(e)||xr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Tr(e)===n&&(n=n.ownerDocument.body),n}function wy(e,t){const n=zn(e);if(Oc(e))return n;if(!Ar(e)){let o=Ms(e);for(;o&&!Ji(o);){if(gr(o)&&!pf(o))return o;o=Ms(o)}return n}let s=Kg(e,t);for(;s&&O3(s)&&pf(s);)s=Kg(s,t);return s&&Ji(s)&&pf(s)&&!Hp(s)?n:s||B3(e)||n}const n5=async function(e){const t=this.getOffsetParent||wy,n=this.getDimensions,s=await n(e.floating);return{reference:t5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function r5(e){return xr(e).direction==="rtl"}const s5={convertOffsetParentRelativeRectToViewportRelativeRect:W3,getDocumentElement:Tr,getClippingRect:J3,getOffsetParent:wy,getElementRects:n5,getClientRects:q3,getDimensions:e5,getScale:Gi,isElement:gr,isRTL:r5};function ky(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function i5(e,t){let n=null,s;const o=Tr(e);function l(){var f;clearTimeout(s),(f=n)==null||f.disconnect(),n=null}function c(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),l();const m=e.getBoundingClientRect(),{left:h,top:g,width:y,height:b}=m;if(f||t(),!y||!b)return;const k=ql(g),w=ql(o.clientWidth-(h+y)),S=ql(o.clientHeight-(g+b)),j=ql(h),N={rootMargin:-k+"px "+-w+"px "+-S+"px "+-j+"px",threshold:Dn(0,Ps(1,p))||1};let M=!0;function _(R){const P=R[0].intersectionRatio;if(P!==p){if(!M)return c();P?c(!1,P):s=setTimeout(()=>{c(!1,1e-7)},1e3)}P===1&&!ky(m,e.getBoundingClientRect())&&c(),M=!1}try{n=new IntersectionObserver(_,{...N,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,N)}n.observe(e)}return c(!0),l}function o5(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=s,m=Vp(e),h=o||l?[...m?ma(m):[],...ma(t)]:[];h.forEach(j=>{o&&j.addEventListener("scroll",n,{passive:!0}),l&&j.addEventListener("resize",n)});const g=m&&f?i5(m,n):null;let y=-1,b=null;c&&(b=new ResizeObserver(j=>{let[E]=j;E&&E.target===m&&b&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var N;(N=b)==null||N.observe(t)})),n()}),m&&!p&&b.observe(m),b.observe(t));let k,w=p?ni(e):null;p&&S();function S(){const j=ni(e);w&&!ky(w,j)&&n(),w=j,k=requestAnimationFrame(S)}return n(),()=>{var j;h.forEach(E=>{o&&E.removeEventListener("scroll",n),l&&E.removeEventListener("resize",n)}),g?.(),(j=b)==null||j.disconnect(),b=null,p&&cancelAnimationFrame(k)}}const a5=I3,l5=P3,c5=A3,u5=_3,d5=R3,Qg=N3,f5=M3,p5=(e,t,n)=>{const s=new Map,o={platform:s5,...n},l={...o.platform,_c:s};return E3(e,t,{...o,platform:l})};var m5=typeof document<"u",h5=function(){},ic=m5?d.useLayoutEffect:h5;function mc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!mc(e[s],t[s]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,o[s]))return!1;for(s=n;s--!==0;){const l=o[s];if(!(l==="_owner"&&e.$$typeof)&&!mc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Sy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yg(e,t){const n=Sy(e);return Math.round(t*n)/n}function mf(e){const t=d.useRef(e);return ic(()=>{t.current=e}),t}function g5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:o,elements:{reference:l,floating:c}={},transform:f=!0,whileElementsMounted:p,open:m}=e,[h,g]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=d.useState(s);mc(y,s)||b(s);const[k,w]=d.useState(null),[S,j]=d.useState(null),E=d.useCallback(O=>{O!==R.current&&(R.current=O,w(O))},[]),N=d.useCallback(O=>{O!==P.current&&(P.current=O,j(O))},[]),M=l||k,_=c||S,R=d.useRef(null),P=d.useRef(null),L=d.useRef(h),G=p!=null,D=mf(p),B=mf(o),W=mf(m),Y=d.useCallback(()=>{if(!R.current||!P.current)return;const O={placement:t,strategy:n,middleware:y};B.current&&(O.platform=B.current),p5(R.current,P.current,O).then(J=>{const T={...J,isPositioned:W.current!==!1};Q.current&&!mc(L.current,T)&&(L.current=T,Ea.flushSync(()=>{g(T)}))})},[y,t,n,B,W]);ic(()=>{m===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,g(O=>({...O,isPositioned:!1})))},[m]);const Q=d.useRef(!1);ic(()=>(Q.current=!0,()=>{Q.current=!1}),[]),ic(()=>{if(M&&(R.current=M),_&&(P.current=_),M&&_){if(D.current)return D.current(M,_,Y);Y()}},[M,_,Y,D,G]);const F=d.useMemo(()=>({reference:R,floating:P,setReference:E,setFloating:N}),[E,N]),Z=d.useMemo(()=>({reference:M,floating:_}),[M,_]),K=d.useMemo(()=>{const O={position:n,left:0,top:0};if(!Z.floating)return O;const J=Yg(Z.floating,h.x),T=Yg(Z.floating,h.y);return f?{...O,transform:"translate("+J+"px, "+T+"px)",...Sy(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:T}},[n,f,Z.floating,h.x,h.y]);return d.useMemo(()=>({...h,update:Y,refs:F,elements:Z,floatingStyles:K}),[h,Y,F,Z,K])}const x5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:o}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?Qg({element:s.current,padding:o}).fn(n):{}:s?Qg({element:s,padding:o}).fn(n):{}}}},y5=(e,t)=>({...a5(e),options:[e,t]}),v5=(e,t)=>({...l5(e),options:[e,t]}),b5=(e,t)=>({...f5(e),options:[e,t]}),w5=(e,t)=>({...c5(e),options:[e,t]}),k5=(e,t)=>({...u5(e),options:[e,t]}),S5=(e,t)=>({...d5(e),options:[e,t]}),C5=(e,t)=>({...x5(e),options:[e,t]});var j5="Arrow",Cy=d.forwardRef((e,t)=>{const{children:n,width:s=10,height:o=5,...l}=e;return a.jsx(He.svg,{...l,ref:t,width:s,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cy.displayName=j5;var E5=Cy;function jy(e){const[t,n]=d.useState(void 0);return tn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let c,f;if("borderBoxSize"in l){const p=l.borderBoxSize,m=Array.isArray(p)?p[0]:p;c=m.inlineSize,f=m.blockSize}else c=e.offsetWidth,f=e.offsetHeight;n({width:c,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Up="Popper",[Ey,co]=Rr(Up),[N5,Ny]=Ey(Up),Ay=e=>{const{__scopePopper:t,children:n}=e,[s,o]=d.useState(null);return a.jsx(N5,{scope:t,anchor:s,onAnchorChange:o,children:n})};Ay.displayName=Up;var Ry="PopperAnchor",Ty=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...o}=e,l=Ny(Ry,n),c=d.useRef(null),f=mt(t,c),p=d.useRef(null);return d.useEffect(()=>{const m=p.current;p.current=s?.current||c.current,m!==p.current&&l.onAnchorChange(p.current)}),s?null:a.jsx(He.div,{...o,ref:f})});Ty.displayName=Ry;var Zp="PopperContent",[A5,R5]=Ey(Zp),Iy=d.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:o=0,align:l="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:k,...w}=e,S=Ny(Zp,n),[j,E]=d.useState(null),N=mt(t,te=>E(te)),[M,_]=d.useState(null),R=jy(M),P=R?.width??0,L=R?.height??0,G=s+(l!=="center"?"-"+l:""),D=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},B=Array.isArray(m)?m:[m],W=B.length>0,Y={padding:D,boundary:B.filter(I5),altBoundary:W},{refs:Q,floatingStyles:F,placement:Z,isPositioned:K,middlewareData:O}=g5({strategy:"fixed",placement:G,whileElementsMounted:(...te)=>o5(...te,{animationFrame:b==="always"}),elements:{reference:S.anchor},middleware:[y5({mainAxis:o+L,alignmentAxis:c}),p&&v5({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?b5():void 0,...Y}),p&&w5({...Y}),k5({...Y,apply:({elements:te,rects:oe,availableWidth:ce,availableHeight:re})=>{const{width:ge,height:be}=oe.reference,Pe=te.floating.style;Pe.setProperty("--radix-popper-available-width",`${ce}px`),Pe.setProperty("--radix-popper-available-height",`${re}px`),Pe.setProperty("--radix-popper-anchor-width",`${ge}px`),Pe.setProperty("--radix-popper-anchor-height",`${be}px`)}}),M&&C5({element:M,padding:f}),P5({arrowWidth:P,arrowHeight:L}),y&&S5({strategy:"referenceHidden",...Y})]}),[J,T]=_y(Z),z=Is(k);tn(()=>{K&&z?.()},[K,z]);const H=O.arrow?.x,I=O.arrow?.y,ie=O.arrow?.centerOffset!==0,[se,le]=d.useState();return tn(()=>{j&&le(window.getComputedStyle(j).zIndex)},[j]),a.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:K?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(A5,{scope:n,placedSide:J,onArrowChange:_,arrowX:H,arrowY:I,shouldHideArrow:ie,children:a.jsx(He.div,{"data-side":J,"data-align":T,...w,ref:N,style:{...w.style,animation:K?void 0:"none"}})})})});Iy.displayName=Zp;var Py="PopperArrow",T5={top:"bottom",right:"left",bottom:"top",left:"right"},My=d.forwardRef(function(t,n){const{__scopePopper:s,...o}=t,l=R5(Py,s),c=T5[l.placedSide];return a.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:a.jsx(E5,{...o,ref:n,style:{...o.style,display:"block"}})})});My.displayName=Py;function I5(e){return e!==null}var P5=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:o}=t,c=o.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[m,h]=_y(n),g={start:"0%",center:"50%",end:"100%"}[h],y=(o.arrow?.x??0)+f/2,b=(o.arrow?.y??0)+p/2;let k="",w="";return m==="bottom"?(k=c?g:`${y}px`,w=`${-p}px`):m==="top"?(k=c?g:`${y}px`,w=`${s.floating.height+p}px`):m==="right"?(k=`${-p}px`,w=c?g:`${b}px`):m==="left"&&(k=`${s.floating.width+p}px`,w=c?g:`${b}px`),{data:{x:k,y:w}}}});function _y(e){const[t,n="center"]=e.split("-");return[t,n]}var Wp=Ay,$c=Ty,qp=Iy,Gp=My,M5="Portal",Hc=d.forwardRef((e,t)=>{const{container:n,...s}=e,[o,l]=d.useState(!1);tn(()=>l(!0),[]);const c=n||o&&globalThis?.document?.body;return c?L8.createPortal(a.jsx(He.div,{...s,ref:t}),c):null});Hc.displayName=M5;function _5(e){const t=L5(e),n=d.forwardRef((s,o)=>{const{children:l,...c}=s,f=d.Children.toArray(l),p=f.find(O5);if(p){const m=p.props.children,h=f.map(g=>g===p?d.Children.count(m)>1?d.Children.only(null):d.isValidElement(m)?m.props.children:null:g);return a.jsx(t,{...c,ref:o,children:d.isValidElement(m)?d.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function L5(e){const t=d.forwardRef((n,s)=>{const{children:o,...l}=n;if(d.isValidElement(o)){const c=z5(o),f=D5(l,o.props);return o.type!==d.Fragment&&(f.ref=s?nr(s,c):c),d.cloneElement(o,f)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var F5=Symbol("radix.slottable");function O5(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F5}function D5(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...f)=>{const p=l(...f);return o(...f),p}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function z5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $5=Tc[" useInsertionEffect ".trim().toString()]||tn;function es({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[o,l,c]=H5({defaultProp:t,onChange:n}),f=e!==void 0,p=f?e:o;{const h=d.useRef(e!==void 0);d.useEffect(()=>{const g=h.current;g!==f&&console.warn(`${s} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=f},[f,s])}const m=d.useCallback(h=>{if(f){const g=B5(h)?h(e):h;g!==e&&c.current?.(g)}else l(h)},[f,e,l,c]);return[p,m]}function H5({defaultProp:e,onChange:t}){const[n,s]=d.useState(e),o=d.useRef(n),l=d.useRef(t);return $5(()=>{l.current=t},[t]),d.useEffect(()=>{o.current!==n&&(l.current?.(n),o.current=n)},[n,o]),[n,s,l]}function B5(e){return typeof e=="function"}function Ly(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Fy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),V5="VisuallyHidden",Oy=d.forwardRef((e,t)=>a.jsx(He.span,{...e,ref:t,style:{...Fy,...e.style}}));Oy.displayName=V5;var U5=Oy,Z5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$i=new WeakMap,Gl=new WeakMap,Kl={},hf=0,Dy=function(e){return e&&(e.host||Dy(e.parentNode))},W5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=Dy(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},q5=function(e,t,n,s){var o=W5(t,Array.isArray(e)?e:[e]);Kl[n]||(Kl[n]=new WeakMap);var l=Kl[n],c=[],f=new Set,p=new Set(o),m=function(g){!g||f.has(g)||(f.add(g),m(g.parentNode))};o.forEach(m);var h=function(g){!g||p.has(g)||Array.prototype.forEach.call(g.children,function(y){if(f.has(y))h(y);else try{var b=y.getAttribute(s),k=b!==null&&b!=="false",w=($i.get(y)||0)+1,S=(l.get(y)||0)+1;$i.set(y,w),l.set(y,S),c.push(y),w===1&&k&&Gl.set(y,!0),S===1&&y.setAttribute(n,"true"),k||y.setAttribute(s,"true")}catch(j){console.error("aria-hidden: cannot operate on ",y,j)}})};return h(t),f.clear(),hf++,function(){c.forEach(function(g){var y=$i.get(g)-1,b=l.get(g)-1;$i.set(g,y),l.set(g,b),y||(Gl.has(g)||g.removeAttribute(s),Gl.delete(g)),b||g.removeAttribute(n)}),hf--,hf||($i=new WeakMap,$i=new WeakMap,Gl=new WeakMap,Kl={})}},Kp=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),o=Z5(e);return o?(s.push.apply(s,Array.from(o.querySelectorAll("[aria-live], script"))),q5(s,o,n,"aria-hidden")):function(){return null}},Cr=function(){return Cr=Object.assign||function(t){for(var n,s=1,o=arguments.length;s<o;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Cr.apply(this,arguments)};function zy(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n}function G5(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,l;s<o;s++)(l||!(s in t))&&(l||(l=Array.prototype.slice.call(t,0,s)),l[s]=t[s]);return e.concat(l||Array.prototype.slice.call(t))}var oc="right-scroll-bar-position",ac="width-before-scroll-bar",K5="with-scroll-bars-hidden",Q5="--removed-body-scroll-bar-size";function gf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Y5(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var o=n.value;o!==s&&(n.value=s,n.callback(s,o))}}}})[0];return n.callback=t,n.facade}var X5=typeof window<"u"?d.useLayoutEffect:d.useEffect,Xg=new WeakMap;function J5(e,t){var n=Y5(null,function(s){return e.forEach(function(o){return gf(o,s)})});return X5(function(){var s=Xg.get(n);if(s){var o=new Set(s),l=new Set(e),c=n.current;o.forEach(function(f){l.has(f)||gf(f,null)}),l.forEach(function(f){o.has(f)||gf(f,c)})}Xg.set(n,e)},[e]),n}function eS(e){return e}function tS(e,t){t===void 0&&(t=eS);var n=[],s=!1,o={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,s);return n.push(c),function(){n=n.filter(function(f){return f!==c})}},assignSyncMedium:function(l){for(s=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(f){return l(f)},filter:function(){return n}}},assignMedium:function(l){s=!0;var c=[];if(n.length){var f=n;n=[],f.forEach(l),c=n}var p=function(){var h=c;c=[],h.forEach(l)},m=function(){return Promise.resolve().then(p)};m(),n={push:function(h){c.push(h),m()},filter:function(h){return c=c.filter(h),n}}}};return o}function nS(e){e===void 0&&(e={});var t=tS(null);return t.options=Cr({async:!0,ssr:!1},e),t}var $y=function(e){var t=e.sideCar,n=zy(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return d.createElement(s,Cr({},n))};$y.isSideCarExport=!0;function rS(e,t){return e.useMedium(t),$y}var Hy=nS(),xf=function(){},Bc=d.forwardRef(function(e,t){var n=d.useRef(null),s=d.useState({onScrollCapture:xf,onWheelCapture:xf,onTouchMoveCapture:xf}),o=s[0],l=s[1],c=e.forwardProps,f=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,g=e.shards,y=e.sideCar,b=e.noRelative,k=e.noIsolation,w=e.inert,S=e.allowPinchZoom,j=e.as,E=j===void 0?"div":j,N=e.gapMode,M=zy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=y,R=J5([n,t]),P=Cr(Cr({},M),o);return d.createElement(d.Fragment,null,h&&d.createElement(_,{sideCar:Hy,removeScrollBar:m,shards:g,noRelative:b,noIsolation:k,inert:w,setCallbacks:l,allowPinchZoom:!!S,lockRef:n,gapMode:N}),c?d.cloneElement(d.Children.only(f),Cr(Cr({},P),{ref:R})):d.createElement(E,Cr({},P,{className:p,ref:R}),f))});Bc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bc.classNames={fullWidth:ac,zeroRight:oc};var sS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iS(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sS();return t&&e.setAttribute("nonce",t),e}function oS(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function aS(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lS=function(){var e=0,t=null;return{add:function(n){e==0&&(t=iS())&&(oS(t,n),aS(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cS=function(){var e=lS();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},By=function(){var e=cS(),t=function(n){var s=n.styles,o=n.dynamic;return e(s,o),null};return t},uS={left:0,top:0,right:0,gap:0},yf=function(e){return parseInt(e||"",10)||0},dS=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[yf(n),yf(s),yf(o)]},fS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uS;var t=dS(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},pS=By(),Ki="data-scroll-locked",mS=function(e,t,n,s){var o=e.left,l=e.top,c=e.right,f=e.gap;return n===void 0&&(n="margin"),`
|
|
10
|
+
.`.concat(K5,` {
|
|
11
|
+
overflow: hidden `).concat(s,`;
|
|
12
|
+
padding-right: `).concat(f,"px ").concat(s,`;
|
|
13
|
+
}
|
|
14
|
+
body[`).concat(Ki,`] {
|
|
15
|
+
overflow: hidden `).concat(s,`;
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
`).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&`
|
|
18
|
+
padding-left: `.concat(o,`px;
|
|
19
|
+
padding-top: `).concat(l,`px;
|
|
20
|
+
padding-right: `).concat(c,`px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: `).concat(f,"px ").concat(s,`;
|
|
24
|
+
`),n==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(oc,` {
|
|
28
|
+
right: `).concat(f,"px ").concat(s,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(ac,` {
|
|
32
|
+
margin-right: `).concat(f,"px ").concat(s,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.`).concat(oc," .").concat(oc,` {
|
|
36
|
+
right: 0 `).concat(s,`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.`).concat(ac," .").concat(ac,` {
|
|
40
|
+
margin-right: 0 `).concat(s,`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body[`).concat(Ki,`] {
|
|
44
|
+
`).concat(Q5,": ").concat(f,`px;
|
|
45
|
+
}
|
|
46
|
+
`)},Jg=function(){var e=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(e)?e:0},hS=function(){d.useEffect(function(){return document.body.setAttribute(Ki,(Jg()+1).toString()),function(){var e=Jg()-1;e<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,e.toString())}},[])},gS=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,o=s===void 0?"margin":s;hS();var l=d.useMemo(function(){return fS(o)},[o]);return d.createElement(pS,{styles:mS(l,!t,o,n?"":"!important")})},Jf=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return Jf=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Jf=!1}var Hi=Jf?{passive:!1}:!1,xS=function(e){return e.tagName==="TEXTAREA"},Vy=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!xS(e)&&n[t]==="visible")},yS=function(e){return Vy(e,"overflowY")},vS=function(e){return Vy(e,"overflowX")},e1=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var o=Uy(e,s);if(o){var l=Zy(e,s),c=l[1],f=l[2];if(c>f)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},bS=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},wS=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},Uy=function(e,t){return e==="v"?yS(t):vS(t)},Zy=function(e,t){return e==="v"?bS(t):wS(t)},kS=function(e,t){return e==="h"&&t==="rtl"?-1:1},SS=function(e,t,n,s,o){var l=kS(e,window.getComputedStyle(t).direction),c=l*s,f=n.target,p=t.contains(f),m=!1,h=c>0,g=0,y=0;do{if(!f)break;var b=Zy(e,f),k=b[0],w=b[1],S=b[2],j=w-S-l*k;(k||j)&&Uy(e,f)&&(g+=j,y+=k);var E=f.parentNode;f=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!p&&f!==document.body||p&&(t.contains(f)||t===f));return(h&&Math.abs(g)<1||!h&&Math.abs(y)<1)&&(m=!0),m},Yl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},t1=function(e){return[e.deltaX,e.deltaY]},n1=function(e){return e&&"current"in e?e.current:e},CS=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jS=function(e){return`
|
|
47
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
48
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
49
|
+
`)},ES=0,Bi=[];function NS(e){var t=d.useRef([]),n=d.useRef([0,0]),s=d.useRef(),o=d.useState(ES++)[0],l=d.useState(By)[0],c=d.useRef(e);d.useEffect(function(){c.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=G5([e.lockRef.current],(e.shards||[]).map(n1),!0).filter(Boolean);return w.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=d.useCallback(function(w,S){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!c.current.allowPinchZoom;var j=Yl(w),E=n.current,N="deltaX"in w?w.deltaX:E[0]-j[0],M="deltaY"in w?w.deltaY:E[1]-j[1],_,R=w.target,P=Math.abs(N)>Math.abs(M)?"h":"v";if("touches"in w&&P==="h"&&R.type==="range")return!1;var L=window.getSelection(),G=L&&L.anchorNode,D=G?G===R||G.contains(R):!1;if(D)return!1;var B=e1(P,R);if(!B)return!0;if(B?_=P:(_=P==="v"?"h":"v",B=e1(P,R)),!B)return!1;if(!s.current&&"changedTouches"in w&&(N||M)&&(s.current=_),!_)return!0;var W=s.current||_;return SS(W,S,w,W==="h"?N:M)},[]),p=d.useCallback(function(w){var S=w;if(!(!Bi.length||Bi[Bi.length-1]!==l)){var j="deltaY"in S?t1(S):Yl(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&CS(_.delta,j)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var N=(c.current.shards||[]).map(n1).filter(Boolean).filter(function(_){return _.contains(S.target)}),M=N.length>0?f(S,N[0]):!c.current.noIsolation;M&&S.cancelable&&S.preventDefault()}}},[]),m=d.useCallback(function(w,S,j,E){var N={name:w,delta:S,target:j,should:E,shadowParent:AS(j)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(M){return M!==N})},1)},[]),h=d.useCallback(function(w){n.current=Yl(w),s.current=void 0},[]),g=d.useCallback(function(w){m(w.type,t1(w),w.target,f(w,e.lockRef.current))},[]),y=d.useCallback(function(w){m(w.type,Yl(w),w.target,f(w,e.lockRef.current))},[]);d.useEffect(function(){return Bi.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",p,Hi),document.addEventListener("touchmove",p,Hi),document.addEventListener("touchstart",h,Hi),function(){Bi=Bi.filter(function(w){return w!==l}),document.removeEventListener("wheel",p,Hi),document.removeEventListener("touchmove",p,Hi),document.removeEventListener("touchstart",h,Hi)}},[]);var b=e.removeScrollBar,k=e.inert;return d.createElement(d.Fragment,null,k?d.createElement(l,{styles:jS(o)}):null,b?d.createElement(gS,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function AS(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const RS=rS(Hy,NS);var Vc=d.forwardRef(function(e,t){return d.createElement(Bc,Cr({},e,{ref:t,sideCar:RS}))});Vc.classNames=Bc.classNames;var TS=[" ","Enter","ArrowUp","ArrowDown"],IS=[" ","Enter"],ri="Select",[Uc,Zc,PS]=cy(ri),[uo]=Rr(ri,[PS,co]),Wc=co(),[MS,Ls]=uo(ri),[_S,LS]=uo(ri),Wy=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:o,onOpenChange:l,value:c,defaultValue:f,onValueChange:p,dir:m,name:h,autoComplete:g,disabled:y,required:b,form:k}=e,w=Wc(t),[S,j]=d.useState(null),[E,N]=d.useState(null),[M,_]=d.useState(!1),R=Fp(m),[P,L]=es({prop:s,defaultProp:o??!1,onChange:l,caller:ri}),[G,D]=es({prop:c,defaultProp:f,onChange:p,caller:ri}),B=d.useRef(null),W=S?k||!!S.closest("form"):!0,[Y,Q]=d.useState(new Set),F=Array.from(Y).map(Z=>Z.props.value).join(";");return a.jsx(Wp,{...w,children:a.jsxs(MS,{required:b,scope:t,trigger:S,onTriggerChange:j,valueNode:E,onValueNodeChange:N,valueNodeHasChildren:M,onValueNodeHasChildrenChange:_,contentId:en(),value:G,onValueChange:D,open:P,onOpenChange:L,dir:R,triggerPointerDownPosRef:B,disabled:y,children:[a.jsx(Uc.Provider,{scope:t,children:a.jsx(_S,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(Z=>{Q(K=>new Set(K).add(Z))},[]),onNativeOptionRemove:d.useCallback(Z=>{Q(K=>{const O=new Set(K);return O.delete(Z),O})},[]),children:n})}),W?a.jsxs(m2,{"aria-hidden":!0,required:b,tabIndex:-1,name:h,autoComplete:g,value:G,onChange:Z=>D(Z.target.value),disabled:y,form:k,children:[G===void 0?a.jsx("option",{value:""}):null,Array.from(Y)]},F):null]})})};Wy.displayName=ri;var qy="SelectTrigger",Gy=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...o}=e,l=Wc(n),c=Ls(qy,n),f=c.disabled||s,p=mt(t,c.onTriggerChange),m=Zc(n),h=d.useRef("touch"),[g,y,b]=g2(w=>{const S=m().filter(N=>!N.disabled),j=S.find(N=>N.value===c.value),E=x2(S,w,j);E!==void 0&&c.onValueChange(E.value)}),k=w=>{f||(c.onOpenChange(!0),b()),w&&(c.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return a.jsx($c,{asChild:!0,...l,children:a.jsx(He.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":h2(c.value)?"":void 0,...o,ref:p,onClick:Ve(o.onClick,w=>{w.currentTarget.focus(),h.current!=="mouse"&&k(w)}),onPointerDown:Ve(o.onPointerDown,w=>{h.current=w.pointerType;const S=w.target;S.hasPointerCapture(w.pointerId)&&S.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(k(w),w.preventDefault())}),onKeyDown:Ve(o.onKeyDown,w=>{const S=g.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&y(w.key),!(S&&w.key===" ")&&TS.includes(w.key)&&(k(),w.preventDefault())})})})});Gy.displayName=qy;var Ky="SelectValue",Qy=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:o,children:l,placeholder:c="",...f}=e,p=Ls(Ky,n),{onValueNodeHasChildrenChange:m}=p,h=l!==void 0,g=mt(t,p.onValueNodeChange);return tn(()=>{m(h)},[m,h]),a.jsx(He.span,{...f,ref:g,style:{pointerEvents:"none"},children:h2(p.value)?a.jsx(a.Fragment,{children:c}):l})});Qy.displayName=Ky;var FS="SelectIcon",Yy=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...o}=e;return a.jsx(He.span,{"aria-hidden":!0,...o,ref:t,children:s||"▼"})});Yy.displayName=FS;var OS="SelectPortal",Xy=e=>a.jsx(Hc,{asChild:!0,...e});Xy.displayName=OS;var si="SelectContent",Jy=d.forwardRef((e,t)=>{const n=Ls(si,e.__scopeSelect),[s,o]=d.useState();if(tn(()=>{o(new DocumentFragment)},[]),!n.open){const l=s;return l?Ea.createPortal(a.jsx(e2,{scope:e.__scopeSelect,children:a.jsx(Uc.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),l):null}return a.jsx(t2,{...e,ref:t})});Jy.displayName=si;var pr=10,[e2,Fs]=uo(si),DS="SelectContentImpl",zS=_5("SelectContent.RemoveScroll"),t2=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:c,side:f,sideOffset:p,align:m,alignOffset:h,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:k,hideWhenDetached:w,avoidCollisions:S,...j}=e,E=Ls(si,n),[N,M]=d.useState(null),[_,R]=d.useState(null),P=mt(t,te=>M(te)),[L,G]=d.useState(null),[D,B]=d.useState(null),W=Zc(n),[Y,Q]=d.useState(!1),F=d.useRef(!1);d.useEffect(()=>{if(N)return Kp(N)},[N]),Op();const Z=d.useCallback(te=>{const[oe,...ce]=W().map(be=>be.ref.current),[re]=ce.slice(-1),ge=document.activeElement;for(const be of te)if(be===ge||(be?.scrollIntoView({block:"nearest"}),be===oe&&_&&(_.scrollTop=0),be===re&&_&&(_.scrollTop=_.scrollHeight),be?.focus(),document.activeElement!==ge))return},[W,_]),K=d.useCallback(()=>Z([L,N]),[Z,L,N]);d.useEffect(()=>{Y&&K()},[Y,K]);const{onOpenChange:O,triggerPointerDownPosRef:J}=E;d.useEffect(()=>{if(N){let te={x:0,y:0};const oe=re=>{te={x:Math.abs(Math.round(re.pageX)-(J.current?.x??0)),y:Math.abs(Math.round(re.pageY)-(J.current?.y??0))}},ce=re=>{te.x<=10&&te.y<=10?re.preventDefault():N.contains(re.target)||O(!1),document.removeEventListener("pointermove",oe),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",ce,{capture:!0})}}},[N,O,J]),d.useEffect(()=>{const te=()=>O(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[O]);const[T,z]=g2(te=>{const oe=W().filter(ge=>!ge.disabled),ce=oe.find(ge=>ge.ref.current===document.activeElement),re=x2(oe,te,ce);re&&setTimeout(()=>re.ref.current.focus())}),H=d.useCallback((te,oe,ce)=>{const re=!F.current&&!ce;(E.value!==void 0&&E.value===oe||re)&&(G(te),re&&(F.current=!0))},[E.value]),I=d.useCallback(()=>N?.focus(),[N]),ie=d.useCallback((te,oe,ce)=>{const re=!F.current&&!ce;(E.value!==void 0&&E.value===oe||re)&&B(te)},[E.value]),se=s==="popper"?ep:n2,le=se===ep?{side:f,sideOffset:p,align:m,alignOffset:h,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:k,hideWhenDetached:w,avoidCollisions:S}:{};return a.jsx(e2,{scope:n,content:N,viewport:_,onViewportChange:R,itemRefCallback:H,selectedItem:L,onItemLeave:I,itemTextRefCallback:ie,focusSelectedItem:K,selectedItemText:D,position:s,isPositioned:Y,searchRef:T,children:a.jsx(Vc,{as:zS,allowPinchZoom:!0,children:a.jsx(Lc,{asChild:!0,trapped:E.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:Ve(o,te=>{E.trigger?.focus({preventScroll:!0}),te.preventDefault()}),children:a.jsx(Na,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:a.jsx(se,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:te=>te.preventDefault(),...j,...le,onPlaced:()=>Q(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:Ve(j.onKeyDown,te=>{const oe=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!oe&&te.key.length===1&&z(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let re=W().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(te.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const ge=te.target,be=re.indexOf(ge);re=re.slice(be+1)}setTimeout(()=>Z(re)),te.preventDefault()}})})})})})})});t2.displayName=DS;var $S="SelectItemAlignedPosition",n2=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...o}=e,l=Ls(si,n),c=Fs(si,n),[f,p]=d.useState(null),[m,h]=d.useState(null),g=mt(t,P=>h(P)),y=Zc(n),b=d.useRef(!1),k=d.useRef(!0),{viewport:w,selectedItem:S,selectedItemText:j,focusSelectedItem:E}=c,N=d.useCallback(()=>{if(l.trigger&&l.valueNode&&f&&m&&w&&S&&j){const P=l.trigger.getBoundingClientRect(),L=m.getBoundingClientRect(),G=l.valueNode.getBoundingClientRect(),D=j.getBoundingClientRect();if(l.dir!=="rtl"){const ge=D.left-L.left,be=G.left-ge,Pe=P.left-be,Ze=P.width+Pe,ct=Math.max(Ze,L.width),ft=window.innerWidth-pr,Ye=Pg(be,[pr,Math.max(pr,ft-ct)]);f.style.minWidth=Ze+"px",f.style.left=Ye+"px"}else{const ge=L.right-D.right,be=window.innerWidth-G.right-ge,Pe=window.innerWidth-P.right-be,Ze=P.width+Pe,ct=Math.max(Ze,L.width),ft=window.innerWidth-pr,Ye=Pg(be,[pr,Math.max(pr,ft-ct)]);f.style.minWidth=Ze+"px",f.style.right=Ye+"px"}const B=y(),W=window.innerHeight-pr*2,Y=w.scrollHeight,Q=window.getComputedStyle(m),F=parseInt(Q.borderTopWidth,10),Z=parseInt(Q.paddingTop,10),K=parseInt(Q.borderBottomWidth,10),O=parseInt(Q.paddingBottom,10),J=F+Z+Y+O+K,T=Math.min(S.offsetHeight*5,J),z=window.getComputedStyle(w),H=parseInt(z.paddingTop,10),I=parseInt(z.paddingBottom,10),ie=P.top+P.height/2-pr,se=W-ie,le=S.offsetHeight/2,te=S.offsetTop+le,oe=F+Z+te,ce=J-oe;if(oe<=ie){const ge=B.length>0&&S===B[B.length-1].ref.current;f.style.bottom="0px";const be=m.clientHeight-w.offsetTop-w.offsetHeight,Pe=Math.max(se,le+(ge?I:0)+be+K),Ze=oe+Pe;f.style.height=Ze+"px"}else{const ge=B.length>0&&S===B[0].ref.current;f.style.top="0px";const Pe=Math.max(ie,F+w.offsetTop+(ge?H:0)+le)+ce;f.style.height=Pe+"px",w.scrollTop=oe-ie+w.offsetTop}f.style.margin=`${pr}px 0`,f.style.minHeight=T+"px",f.style.maxHeight=W+"px",s?.(),requestAnimationFrame(()=>b.current=!0)}},[y,l.trigger,l.valueNode,f,m,w,S,j,l.dir,s]);tn(()=>N(),[N]);const[M,_]=d.useState();tn(()=>{m&&_(window.getComputedStyle(m).zIndex)},[m]);const R=d.useCallback(P=>{P&&k.current===!0&&(N(),E?.(),k.current=!1)},[N,E]);return a.jsx(BS,{scope:n,contentWrapper:f,shouldExpandOnScrollRef:b,onScrollButtonChange:R,children:a.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:a.jsx(He.div,{...o,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});n2.displayName=$S;var HS="SelectPopperPosition",ep=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:o=pr,...l}=e,c=Wc(n);return a.jsx(qp,{...c,...l,ref:t,align:s,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ep.displayName=HS;var[BS,Qp]=uo(si,{}),tp="SelectViewport",r2=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...o}=e,l=Fs(tp,n),c=Qp(tp,n),f=mt(t,l.onViewportChange),p=d.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),a.jsx(Uc.Slot,{scope:n,children:a.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ve(o.onScroll,m=>{const h=m.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:y}=c;if(y?.current&&g){const b=Math.abs(p.current-h.scrollTop);if(b>0){const k=window.innerHeight-pr*2,w=parseFloat(g.style.minHeight),S=parseFloat(g.style.height),j=Math.max(w,S);if(j<k){const E=j+b,N=Math.min(k,E),M=E-N;g.style.height=N+"px",g.style.bottom==="0px"&&(h.scrollTop=M>0?M:0,g.style.justifyContent="flex-end")}}}p.current=h.scrollTop})})})]})});r2.displayName=tp;var s2="SelectGroup",[VS,US]=uo(s2),ZS=d.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,o=en();return a.jsx(VS,{scope:n,id:o,children:a.jsx(He.div,{role:"group","aria-labelledby":o,...s,ref:t})})});ZS.displayName=s2;var i2="SelectLabel",WS=d.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,o=US(i2,n);return a.jsx(He.div,{id:o.id,...s,ref:t})});WS.displayName=i2;var hc="SelectItem",[qS,o2]=uo(hc),a2=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:o=!1,textValue:l,...c}=e,f=Ls(hc,n),p=Fs(hc,n),m=f.value===s,[h,g]=d.useState(l??""),[y,b]=d.useState(!1),k=mt(t,E=>p.itemRefCallback?.(E,s,o)),w=en(),S=d.useRef("touch"),j=()=>{o||(f.onValueChange(s),f.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(qS,{scope:n,value:s,disabled:o,textId:w,isSelected:m,onItemTextChange:d.useCallback(E=>{g(N=>N||(E?.textContent??"").trim())},[]),children:a.jsx(Uc.ItemSlot,{scope:n,value:s,disabled:o,textValue:h,children:a.jsx(He.div,{role:"option","aria-labelledby":w,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:k,onFocus:Ve(c.onFocus,()=>b(!0)),onBlur:Ve(c.onBlur,()=>b(!1)),onClick:Ve(c.onClick,()=>{S.current!=="mouse"&&j()}),onPointerUp:Ve(c.onPointerUp,()=>{S.current==="mouse"&&j()}),onPointerDown:Ve(c.onPointerDown,E=>{S.current=E.pointerType}),onPointerMove:Ve(c.onPointerMove,E=>{S.current=E.pointerType,o?p.onItemLeave?.():S.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(c.onPointerLeave,E=>{E.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:Ve(c.onKeyDown,E=>{p.searchRef?.current!==""&&E.key===" "||(IS.includes(E.key)&&j(),E.key===" "&&E.preventDefault())})})})})});a2.displayName=hc;var oa="SelectItemText",l2=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:o,...l}=e,c=Ls(oa,n),f=Fs(oa,n),p=o2(oa,n),m=LS(oa,n),[h,g]=d.useState(null),y=mt(t,j=>g(j),p.onItemTextChange,j=>f.itemTextRefCallback?.(j,p.value,p.disabled)),b=h?.textContent,k=d.useMemo(()=>a.jsx("option",{value:p.value,disabled:p.disabled,children:b},p.value),[p.disabled,p.value,b]),{onNativeOptionAdd:w,onNativeOptionRemove:S}=m;return tn(()=>(w(k),()=>S(k)),[w,S,k]),a.jsxs(a.Fragment,{children:[a.jsx(He.span,{id:p.textId,...l,ref:y}),p.isSelected&&c.valueNode&&!c.valueNodeHasChildren?Ea.createPortal(l.children,c.valueNode):null]})});l2.displayName=oa;var c2="SelectItemIndicator",u2=d.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return o2(c2,n).isSelected?a.jsx(He.span,{"aria-hidden":!0,...s,ref:t}):null});u2.displayName=c2;var np="SelectScrollUpButton",d2=d.forwardRef((e,t)=>{const n=Fs(np,e.__scopeSelect),s=Qp(np,e.__scopeSelect),[o,l]=d.useState(!1),c=mt(t,s.onScrollButtonChange);return tn(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=p.scrollTop>0;l(m)};const p=n.viewport;return f(),p.addEventListener("scroll",f),()=>p.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),o?a.jsx(p2,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:p}=n;f&&p&&(f.scrollTop=f.scrollTop-p.offsetHeight)}}):null});d2.displayName=np;var rp="SelectScrollDownButton",f2=d.forwardRef((e,t)=>{const n=Fs(rp,e.__scopeSelect),s=Qp(rp,e.__scopeSelect),[o,l]=d.useState(!1),c=mt(t,s.onScrollButtonChange);return tn(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=p.scrollHeight-p.clientHeight,h=Math.ceil(p.scrollTop)<m;l(h)};const p=n.viewport;return f(),p.addEventListener("scroll",f),()=>p.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),o?a.jsx(p2,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:p}=n;f&&p&&(f.scrollTop=f.scrollTop+p.offsetHeight)}}):null});f2.displayName=rp;var p2=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...o}=e,l=Fs("SelectScrollButton",n),c=d.useRef(null),f=Zc(n),p=d.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return d.useEffect(()=>()=>p(),[p]),tn(()=>{f().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),a.jsx(He.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ve(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(s,50))}),onPointerMove:Ve(o.onPointerMove,()=>{l.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(s,50))}),onPointerLeave:Ve(o.onPointerLeave,()=>{p()})})}),GS="SelectSeparator",KS=d.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return a.jsx(He.div,{"aria-hidden":!0,...s,ref:t})});KS.displayName=GS;var sp="SelectArrow",QS=d.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,o=Wc(n),l=Ls(sp,n),c=Fs(sp,n);return l.open&&c.position==="popper"?a.jsx(Gp,{...o,...s,ref:t}):null});QS.displayName=sp;var YS="SelectBubbleInput",m2=d.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const o=d.useRef(null),l=mt(s,o),c=Ly(t);return d.useEffect(()=>{const f=o.current;if(!f)return;const p=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(p,"value").set;if(c!==t&&h){const g=new Event("change",{bubbles:!0});h.call(f,t),f.dispatchEvent(g)}},[c,t]),a.jsx(He.select,{...n,style:{...Fy,...n.style},ref:l,defaultValue:t})});m2.displayName=YS;function h2(e){return e===""||e===void 0}function g2(e){const t=Is(e),n=d.useRef(""),s=d.useRef(0),o=d.useCallback(c=>{const f=n.current+c;t(f),(function p(m){n.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>p(""),1e3))})(f)},[t]),l=d.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,o,l]}function x2(e,t,n){const o=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=XS(e,Math.max(l,0));o.length===1&&(c=c.filter(m=>m!==n));const p=c.find(m=>m.textValue.toLowerCase().startsWith(o.toLowerCase()));return p!==n?p:void 0}function XS(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var JS=Wy,eC=Gy,tC=Qy,nC=Yy,rC=Xy,sC=Jy,iC=r2,oC=a2,aC=l2,lC=u2,cC=d2,uC=f2;const dC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),r1=e=>{const t=fC(e);return t.charAt(0).toUpperCase()+t.slice(1)},y2=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),pC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var mC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hC=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:c,...f},p)=>d.createElement("svg",{ref:p,...mC,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:y2("lucide",o),...!l&&!pC(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,h])=>d.createElement(m,h)),...Array.isArray(l)?l:[l]]));const je=(e,t)=>{const n=d.forwardRef(({className:s,...o},l)=>d.createElement(hC,{ref:l,iconNode:t,className:y2(`lucide-${dC(r1(e))}`,`lucide-${e}`,s),...o}));return n.displayName=r1(e),n};const gC=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],xC=je("archive-restore",gC);const yC=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],v2=je("archive",yC);const vC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],bC=je("arrow-left",vC);const wC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],gc=je("arrow-right",wC);const kC=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],b2=je("arrow-up",kC);const SC=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],ip=je("bot",SC);const CC=[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]],op=je("bug",CC);const jC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$n=je("check",jC);const EC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cn=je("chevron-down",EC);const NC=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],AC=je("chevron-left",NC);const RC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],An=je("chevron-right",RC);const TC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],IC=je("chevron-up",TC);const PC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Yp=je("circle-alert",PC);const MC=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ha=je("circle-check-big",MC);const _C=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],s1=je("circle-question-mark",_C);const LC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],FC=je("circle-stop",LC);const OC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],As=je("circle",OC);const DC=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],zC=je("clipboard-list",DC);const $C=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],HC=je("clipboard",$C);const BC=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],VC=je("clock",BC);const UC=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],i1=je("code",UC);const ZC=[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]],xc=je("construction",ZC);const WC=[["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"}]],w2=je("copy",WC);const qC=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],GC=je("corner-down-right",qC);const KC=[["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"}]],QC=je("database",KC);const YC=[["path",{d:"M10 10 7 7",key:"zp14k7"}],["path",{d:"m10 14-3 3",key:"1jrpxk"}],["path",{d:"m14 10 3-3",key:"7tigam"}],["path",{d:"m14 14 3 3",key:"vm23p3"}],["path",{d:"M14.205 4.139a4 4 0 1 1 5.439 5.863",key:"1tm5p2"}],["path",{d:"M19.637 14a4 4 0 1 1-5.432 5.868",key:"16egi2"}],["path",{d:"M4.367 10a4 4 0 1 1 5.438-5.862",key:"1wta6a"}],["path",{d:"M9.795 19.862a4 4 0 1 1-5.429-5.873",key:"q39hpv"}],["rect",{x:"10",y:"8",width:"4",height:"8",rx:"1",key:"phrjt1"}]],XC=je("drone",YC);const JC=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ga=je("external-link",JC);const ej=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],Xp=je("file-pen",ej);const tj=[["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:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],nj=je("file-plus",tj);const rj=[["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"}]],eo=je("file-text",rj);const sj=[["path",{d:"M10.7 20H4a2 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.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],ij=je("folder-search",sj);const oj=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],o1=je("git-branch",oj);const aj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Jp=je("globe",aj);const lj=[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]],cj=je("hammer",lj);const uj=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],dj=je("laptop",uj);const fj=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],xa=je("lightbulb",fj);const pj=[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],a1=je("list-todo",pj);const mj=[["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"}]],qc=je("list",mj);const hj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aa=je("loader-circle",hj);const gj=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Gc=je("maximize-2",gj);const xj=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],yj=je("message-circle-question-mark",xj);const vj=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],l1=je("message-circle",vj);const bj=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],wj=je("messages-square",bj);const kj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],k2=je("message-square",kj);const Sj=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]],Cj=je("mic-off",Sj);const jj=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Ej=je("mic",jj);const Nj=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Kc=je("minimize-2",Nj);const Aj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],Rj=je("panel-right-close",Aj);const Tj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],Ij=je("panel-right-open",Tj);const Pj=[["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"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],S2=je("pencil",Pj);const Mj=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],em=je("play",Mj);const _j=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Lj=je("plus",_j);const Fj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Oj=je("refresh-cw",Fj);const Dj=[["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"}]],yc=je("rotate-ccw",Dj);const zj=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],C2=je("scale",zj);const $j=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ii=je("search",$j);const Hj=[["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"}]],Bj=je("send",Hj);const Vj=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],tm=je("settings",Vj);const Uj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],ya=je("sparkles",Uj);const Zj=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],j2=je("square-check-big",Zj);const Wj=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],nm=je("square-pen",Wj);const qj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Gj=je("square",qj);const Kj=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],c1=je("table",Kj);const Qj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Qc=je("terminal",Qj);const Yj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Xj=je("trash-2",Yj);const Jj=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],eE=je("trash",Jj);const tE=[["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"}]],E2=je("triangle-alert",tE);const nE=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],u1=je("wrench",nE);const rE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],d1=je("x",rE);const sE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],va=je("zap",sE);function Yo({...e}){return a.jsx(JS,{"data-slot":"select",...e})}function Xo({...e}){return a.jsx(tC,{"data-slot":"select-value",...e})}function Jo({className:e,size:t="default",children:n,...s}){return a.jsxs(eC,{"data-slot":"select-trigger","data-size":t,className:Ne("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s,children:[n,a.jsx(nC,{asChild:!0,children:a.jsx(cn,{className:"size-4 opacity-50"})})]})}function ea({className:e,children:t,position:n="popper",...s}){return a.jsx(rC,{children:a.jsxs(sC,{"data-slot":"select-content",className:Ne("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 relative z-[200] max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[a.jsx(iE,{}),a.jsx(iC,{className:Ne("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),a.jsx(oE,{})]})})}function Nt({className:e,children:t,...n}){return a.jsxs(oC,{"data-slot":"select-item",className:Ne("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[a.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:a.jsx(lC,{children:a.jsx($n,{className:"size-4"})})}),a.jsx(aC,{children:t})]})}function iE({className:e,...t}){return a.jsx(cC,{"data-slot":"select-scroll-up-button",className:Ne("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(IC,{className:"size-4"})})}function oE({className:e,...t}){return a.jsx(uC,{"data-slot":"select-scroll-down-button",className:Ne("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(cn,{className:"size-4"})})}function aE(e,t){return d.useReducer((n,s)=>t[n][s]??n,e)}var Ir=e=>{const{present:t,children:n}=e,s=lE(t),o=typeof n=="function"?n({present:s.isPresent}):d.Children.only(n),l=mt(s.ref,cE(o));return typeof n=="function"||s.isPresent?d.cloneElement(o,{ref:l}):null};Ir.displayName="Presence";function lE(e){const[t,n]=d.useState(),s=d.useRef(null),o=d.useRef(e),l=d.useRef("none"),c=e?"mounted":"unmounted",[f,p]=aE(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const m=Xl(s.current);l.current=f==="mounted"?m:"none"},[f]),tn(()=>{const m=s.current,h=o.current;if(h!==e){const y=l.current,b=Xl(m);e?p("MOUNT"):b==="none"||m?.display==="none"?p("UNMOUNT"):p(h&&y!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,p]),tn(()=>{if(t){let m;const h=t.ownerDocument.defaultView??window,g=b=>{const w=Xl(s.current).includes(CSS.escape(b.animationName));if(b.target===t&&w&&(p("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",m=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},y=b=>{b.target===t&&(l.current=Xl(s.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{h.clearTimeout(m),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:d.useCallback(m=>{s.current=m?getComputedStyle(m):null,n(m)},[])}}function Xl(e){return e?.animationName||"none"}function cE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yc="Checkbox",[uE]=Rr(Yc),[dE,rm]=uE(Yc);function fE(e){const{__scopeCheckbox:t,checked:n,children:s,defaultChecked:o,disabled:l,form:c,name:f,onCheckedChange:p,required:m,value:h="on",internal_do_not_use_render:g}=e,[y,b]=es({prop:n,defaultProp:o??!1,onChange:p,caller:Yc}),[k,w]=d.useState(null),[S,j]=d.useState(null),E=d.useRef(!1),N=k?!!c||!!k.closest("form"):!0,M={checked:y,disabled:l,setChecked:b,control:k,setControl:w,name:f,form:c,value:h,hasConsumerStoppedPropagationRef:E,required:m,defaultChecked:Rs(o)?!1:o,isFormControl:N,bubbleInput:S,setBubbleInput:j};return a.jsx(dE,{scope:t,...M,children:pE(g)?g(M):s})}var N2="CheckboxTrigger",A2=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},o)=>{const{control:l,value:c,disabled:f,checked:p,required:m,setControl:h,setChecked:g,hasConsumerStoppedPropagationRef:y,isFormControl:b,bubbleInput:k}=rm(N2,e),w=mt(o,h),S=d.useRef(p);return d.useEffect(()=>{const j=l?.form;if(j){const E=()=>g(S.current);return j.addEventListener("reset",E),()=>j.removeEventListener("reset",E)}},[l,g]),a.jsx(He.button,{type:"button",role:"checkbox","aria-checked":Rs(p)?"mixed":p,"aria-required":m,"data-state":_2(p),"data-disabled":f?"":void 0,disabled:f,value:c,...s,ref:w,onKeyDown:Ve(t,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:Ve(n,j=>{g(E=>Rs(E)?!0:!E),k&&b&&(y.current=j.isPropagationStopped(),y.current||j.stopPropagation())})})});A2.displayName=N2;var R2=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:s,checked:o,defaultChecked:l,required:c,disabled:f,value:p,onCheckedChange:m,form:h,...g}=e;return a.jsx(fE,{__scopeCheckbox:n,checked:o,defaultChecked:l,disabled:f,required:c,onCheckedChange:m,name:s,form:h,value:p,internal_do_not_use_render:({isFormControl:y})=>a.jsxs(a.Fragment,{children:[a.jsx(A2,{...g,ref:t,__scopeCheckbox:n}),y&&a.jsx(M2,{__scopeCheckbox:n})]})})});R2.displayName=Yc;var T2="CheckboxIndicator",I2=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:s,...o}=e,l=rm(T2,n);return a.jsx(Ir,{present:s||Rs(l.checked)||l.checked===!0,children:a.jsx(He.span,{"data-state":_2(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});I2.displayName=T2;var P2="CheckboxBubbleInput",M2=d.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:s,hasConsumerStoppedPropagationRef:o,checked:l,defaultChecked:c,required:f,disabled:p,name:m,value:h,form:g,bubbleInput:y,setBubbleInput:b}=rm(P2,e),k=mt(n,b),w=Ly(l),S=jy(s);d.useEffect(()=>{const E=y;if(!E)return;const N=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(N,"checked").set,R=!o.current;if(w!==l&&_){const P=new Event("click",{bubbles:R});E.indeterminate=Rs(l),_.call(E,Rs(l)?!1:l),E.dispatchEvent(P)}},[y,w,l,o]);const j=d.useRef(Rs(l)?!1:l);return a.jsx(He.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??j.current,required:f,disabled:p,name:m,value:h,form:g,...t,tabIndex:-1,ref:k,style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});M2.displayName=P2;function pE(e){return typeof e=="function"}function Rs(e){return e==="indeterminate"}function _2(e){return Rs(e)?"indeterminate":e?"checked":"unchecked"}function Jl({className:e,...t}){return a.jsx(R2,{"data-slot":"checkbox",className:Ne("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(I2,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:a.jsx($n,{className:"size-3.5"})})})}var mE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hE=mE.reduce((e,t)=>{const n=Kx(`Primitive.${t}`),s=d.forwardRef((o,l)=>{const{asChild:c,...f}=o,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(p,{...f,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),gE="Label",L2=d.forwardRef((e,t)=>a.jsx(hE.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));L2.displayName=gE;var xE=L2;function nt({className:e,...t}){return a.jsx(xE,{"data-slot":"label",className:Ne("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function yE(){const[e,t]=d.useState(null),[n,s]=d.useState([]),[o,l]=d.useState({status:!0,config:!0,start:!0,stop:!0,list:!0,rename:!0,permissions:!0,permissionDecision:!0,listDir:!0,readFile:!0,workingDirs:!0,commands:!0,bulkOperations:!0,geminiHealth:!0,geminiTranscribe:!0,geminiSummarize:!0,notifications:!0}),[c,f]=d.useState("/tmp"),[p,m]=d.useState("Hello"),[h,g]=d.useState(""),[y,b]=d.useState(""),[k,w]=d.useState(""),[S,j]=d.useState(""),[E,N]=d.useState(""),[M,_]=d.useState(""),[R,P]=d.useState(""),[L,G]=d.useState(""),[D,B]=d.useState("20"),[W,Y]=d.useState("0"),[Q,F]=d.useState(""),[Z,K]=d.useState(""),[O,J]=d.useState(""),[T,z]=d.useState(""),[H,I]=d.useState(!1),[ie,se]=d.useState(!1),[le,te]=d.useState(""),[oe,ce]=d.useState(!1),[re,ge]=d.useState(""),[be,Pe]=d.useState(""),[Ze,ct]=d.useState(!1),[ft,Ye]=d.useState(!1),[jt,et]=d.useState(""),[Kt,Qt]=d.useState(""),[nn,vt]=d.useState(""),[Bn,rr]=d.useState(""),[ae,xe]=d.useState(JSON.stringify({action:"approve",modifiedInput:{},denyReason:""},null,2)),[de,fe]=d.useState({}),[ke,Be]=d.useState([]),[Ke,it]=d.useState([]),[ot,bt]=d.useState(""),[ht,Lt]=d.useState("{}"),[Ft,Tn]=d.useState(null),[Fr,sr]=d.useState(""),[ir,fi]=d.useState("audio/wav"),[Or,we]=d.useState(""),[Fe,qe]=d.useState("Orchestrator Test"),[tt,gt]=d.useState("This is a test notification"),[zt,or]=d.useState(null),rs=d.useRef(null);d.useEffect(()=>{Vn()},[]);const _e=(V,Se)=>{fe(rt=>({...rt,[V]:Se}))},Vn=async()=>{try{const V=await Ee.getConversations({limit:100});s(V.conversations||[])}catch{}},Dr=async()=>{try{const V=await Ee.getWorkingDirectories();_e("workingDirsResult",V),V.directories&&Be(V.directories)}catch(V){_e("workingDirsResult",{error:V.message})}},pi=async()=>{try{const V=await Ee.getCommands(ot||void 0);_e("commandsResult",V)}catch(V){_e("commandsResult",{error:V.message})}},mo=V=>{const Se="=".repeat((4-V.length%4)%4),rt=(V+Se).replace(/-/g,"+").replace(/_/g,"/"),at=atob(rt),gn=new Uint8Array(at.length);for(let pt=0;pt<at.length;++pt)gn[pt]=at.charCodeAt(pt);return gn},mu=async()=>{try{const Se=await(await Ee.fetchWithAuth("/api/notifications/status")).json();or(Se),_e("notificationsStatus",Se)}catch(V){_e("notificationsStatus",{error:V.message})}},hu=async()=>{try{if(await Notification.requestPermission()!=="granted"){_e("notificationsRegister",{error:"Notification permission denied"});return}const Se=await navigator.serviceWorker.ready,at=await(await Ee.fetchWithAuth("/api/notifications/status")).json();if(!at.publicKey){_e("notificationsRegister",{error:"Server missing VAPID public key"});return}let pt=await Se.pushManager.getSubscription();pt||(pt=await Se.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:mo(at.publicKey)}));const Ht=await(await Ee.fetchWithAuth("/api/notifications/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(pt)})).json();_e("notificationsRegister",Ht)}catch(V){_e("notificationsRegister",{error:V.message})}},gu=async()=>{try{const Se=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!Se){_e("notificationsUnregister",{error:"No active subscription"});return}const rt=Se.endpoint;await Se.unsubscribe();const gn=await(await Ee.fetchWithAuth("/api/notifications/unregister",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:rt})})).json();_e("notificationsUnregister",gn)}catch(V){_e("notificationsUnregister",{error:V.message})}},zr=async()=>{try{const Se=await(await Ee.fetchWithAuth("/api/notifications/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:Fe,message:tt})})).json();_e("notificationsTest",Se)}catch(V){_e("notificationsTest",{error:V.message})}},Fa=async()=>{try{const Se=await(await Ee.fetchWithAuth("/api/config")).json();_e("configGetResult",Se),Lt(JSON.stringify(Se,null,2))}catch(V){_e("configGetResult",{error:V.message})}},Oa=async()=>{try{let V;try{V=JSON.parse(ht)}catch{_e("configUpdateResult",{error:"Invalid JSON"});return}const rt=await(await Ee.fetchWithAuth("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})).json();_e("configUpdateResult",rt)}catch(V){_e("configUpdateResult",{error:V.message})}},$t=V=>{l(Se=>({...Se,[V]:!Se[V]}))},Da=async()=>{try{const V=await Ee.getSystemStatus();_e("statusResult",V)}catch(V){_e("statusResult",{error:V.message})}},za=async()=>{try{const V=await Ee.getConversations({limit:D?parseInt(D):void 0,offset:W?parseInt(W):void 0,projectPath:Q||void 0});_e("sidebarConversationsResult",V),V.conversations&&s(V.conversations)}catch(V){_e("sidebarConversationsResult",{error:V.message})}},$a=async()=>{try{const V={workingDirectory:c,initialPrompt:p};h&&h!=="default-model"&&(V.model=h),y&&(V.systemPrompt=y),k&&(V.claudeExecutablePath=k),S&&S!=="default-mode"&&(V.permissionMode=S);const Se=await Ee.startConversation(V);_e("startResult",Se),Se.streamingId&&(_(Se.streamingId),P(Se.streamingId),ho(Se.streamingId),Vn())}catch(V){_e("startResult",{error:V.message})}},ho=async V=>{const Se=V||M;if(!Se){it([a.jsx("span",{className:"text-red-400",children:"Please enter a streaming ID"},"error")]);return}it([a.jsx("span",{className:"text-green-400",children:"Connecting to stream..."},"connecting")]);try{const at=(await Ee.fetchWithAuth(Ee.getStreamUrl(Se))).body.getReader(),gn=new TextDecoder;t(at);let pt="",Zn=0,Ht=!1;for(;;){const{done:$r,value:ju}=await at.read();if($r){it(Wn=>[...Wn,a.jsx("span",{className:"text-neutral-500",children:"[Stream ended]"},"ended")]);break}const xo=gn.decode(ju,{stream:!0});pt+=xo;const ut=pt.split(`
|
|
50
|
+
`);pt=ut.pop()||"";const zs=[];for(const Wn of ut)if(Wn.trim()){let gi=Wn;if(Wn.startsWith("data: ")&&(gi=Wn.substring(6)),Wn.startsWith(":"))continue;Zn++;const Va=a.jsxs("div",{className:"my-0.5 py-0.5 border-b border-dotted border-neutral-700",children:[a.jsxs("span",{className:"text-neutral-500",children:[Zn,":"]})," ",gi]},`line-${Zn}`);zs.push(Va)}zs.length>0&&(Ht?it(Wn=>[...Wn,...zs]):(Ht=!0,it(zs)))}}catch(rt){it(at=>[...at,a.jsxs("span",{className:"text-red-400",children:["Error: ",rt.message]},"error")])}},xu=()=>{e&&(e.cancel(),t(null),it(V=>[...V,a.jsx("span",{className:"text-yellow-300",children:"[Stream stopped by user]"},"stopped")]))},yu=()=>{it([])},Rt=async()=>{try{const V=await Ee.stopConversation(R);_e("stopResult",V)}catch(V){_e("stopResult",{error:V.message})}},vu=async()=>{try{const V=await Ee.getConversationDetails(L);_e("detailsResult",V)}catch(V){_e("detailsResult",{error:V.message})}},go=async()=>{try{const V=await Ee.getPermissions({streamingId:Z||void 0,status:O==="all"?void 0:O});_e("permissionsResult",V)}catch(V){_e("permissionsResult",{error:V.message})}},Ha=async()=>{try{if(!T){_e("listResult",{error:"Path is required"});return}const V=await Ee.listDirectory({path:T,recursive:H,respectGitignore:ie});_e("listResult",V)}catch(V){_e("listResult",{error:V.message})}},mi=async()=>{try{if(!le){_e("readResult",{error:"Path is required"});return}const V=await Ee.readFile(le);_e("readResult",V)}catch(V){_e("readResult",{error:V.message})}},bu=async()=>{try{if(!re){_e("renameResult",{error:"Session ID is required"});return}const V={};be.trim()!==""&&(V.customName=be.trim()),V.pinned=Ze,V.archived=ft,jt.trim()!==""&&(V.continuationSessionId=jt.trim()),Kt.trim()!==""&&(V.initialCommitHead=Kt.trim()),nn.trim()!==""&&nn!=="keep-current"&&(V.permissionMode=nn.trim());const Se=await Ee.updateSession(re,V);_e("renameResult",Se),Se.success&&Vn()}catch(V){_e("renameResult",{error:V.message})}},Ba=async()=>{try{const V=await Ee.archiveAllSessions();_e("archiveAllResult",V),V.success&&Vn()}catch(V){_e("archiveAllResult",{error:V.message})}},hi=async()=>{try{if(!Bn){_e("permissionDecisionResult",{error:"Request ID is required"});return}let V;try{V=JSON.parse(ae)}catch{_e("permissionDecisionResult",{error:"Invalid JSON body"});return}const Se=await Ee.sendPermissionDecision(Bn,V);_e("permissionDecisionResult",Se)}catch(V){_e("permissionDecisionResult",{error:V.message})}},Un=async()=>{try{const Se=await(await Ee.fetchWithAuth("/api/gemini/health")).json();_e("geminiHealthResult",Se)}catch(V){_e("geminiHealthResult",{error:V.message})}},wu=async()=>{try{let V={};if(Ft){const Se=new FormData;Se.append("audio",Ft);const at=await(await Ee.fetchWithAuth("/api/gemini/transcribe",{method:"POST",body:Se})).json();_e("geminiTranscribeResult",at)}else if(Fr){const rt=await(await Ee.fetchWithAuth("/api/gemini/transcribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audio:Fr,mimeType:ir})})).json();_e("geminiTranscribeResult",rt)}else _e("geminiTranscribeResult",{error:"Please provide an audio file or base64 data"})}catch(V){_e("geminiTranscribeResult",{error:V.message})}},In=async()=>{try{if(!Or){_e("geminiSummarizeResult",{error:"Please provide text to summarize"});return}const Se=await(await Ee.fetchWithAuth("/api/gemini/summarize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:Or})})).json();_e("geminiSummarizeResult",Se)}catch(V){_e("geminiSummarizeResult",{error:V.message})}},ku=V=>{V.target.files&&V.target.files[0]&&(Tn(V.target.files[0]),sr(""))},Su=async(V,Se)=>{try{const rt=JSON.stringify(V,null,2);await navigator.clipboard.writeText(rt);const at=Se.textContent;Se.textContent="Copied!",Se.classList.add("!bg-green-600"),setTimeout(()=>{Se.textContent=at,Se.classList.remove("!bg-green-600")},2e3)}catch(rt){console.error("Failed to copy:",rt)}},Cu=async V=>{try{const Se=Ke.filter(at=>at.type==="div").map(at=>at.props.children[2]).join(`
|
|
51
|
+
`);await navigator.clipboard.writeText(Se);const rt=V.textContent;V.textContent="Copied!",V.classList.add("!bg-green-600"),setTimeout(()=>{V.textContent=rt,V.classList.remove("!bg-green-600")},2e3)}catch(Se){console.error("Failed to copy:",Se)}},xt=({data:V,resultId:Se})=>a.jsxs("div",{className:"relative",children:[a.jsx(Oe,{className:"absolute top-1 right-1 z-10 h-auto py-1 px-2.5 text-xs bg-neutral-600 hover:bg-neutral-700",onClick:rt=>Su(V,rt.currentTarget),"aria-label":"Copy JSON to clipboard",children:"Copy JSON"}),a.jsx("json-viewer",{data:JSON.stringify(V)})]});return a.jsxs("div",{className:"flex w-full h-screen min-h-0 font-mono bg-neutral-100 fixed top-0 left-0 right-0 bottom-0",children:[a.jsxs("div",{className:"w-[450px] bg-neutral-200 overflow-y-auto border-r-2 border-neutral-300 p-5 box-border min-h-0",children:[a.jsx("h1",{className:"text-neutral-800 mt-0 mb-4",children:"Orchestrator Debug Interface"}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.status&&"before:-rotate-90"),onClick:()=>$t("status"),"aria-label":"Toggle System Status section",children:"GET /api/system/status"}),a.jsxs("div",{className:Ne("overflow-hidden",o.status&&"hidden"),children:[a.jsx(Oe,{onClick:Da,className:"bg-neutral-800 hover:bg-neutral-700",children:"Get Status"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.statusResult&&a.jsx(xt,{data:de.statusResult,resultId:"statusResult"})}),de.statusResult&&!de.statusResult.error&&a.jsxs("div",{className:"mt-2.5 text-xs text-neutral-600",children:[a.jsxs("div",{children:[a.jsx("strong",{children:"Claude Version:"})," ",de.statusResult.claudeVersion]}),a.jsxs("div",{children:[a.jsx("strong",{children:"Claude Path:"})," ",de.statusResult.claudePath]}),a.jsxs("div",{children:[a.jsx("strong",{children:"Config Path:"})," ",de.statusResult.configPath]}),a.jsxs("div",{children:[a.jsx("strong",{children:"Active Conversations:"})," ",de.statusResult.activeConversations]}),a.jsxs("div",{children:[a.jsx("strong",{children:"Machine ID:"})," ",de.statusResult.machineId]})]})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.config&&"before:-rotate-90"),onClick:()=>$t("config"),"aria-label":"Toggle Config section",children:"GET/PUT /api/config"}),a.jsxs("div",{className:Ne("overflow-hidden",o.config&&"hidden"),children:[a.jsx(Oe,{onClick:Fa,className:"bg-neutral-800 hover:bg-neutral-700",children:"Get Config"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.configGetResult&&a.jsx(xt,{data:de.configGetResult,resultId:"configGetResult"})}),a.jsxs("div",{className:"mt-4 border-t border-neutral-300 pt-4",children:[a.jsx("h4",{className:"m-0 mb-2.5 text-sm",children:"Update Config"}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"configUpdateBody",children:["Config JSON ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Es,{id:"configUpdateBody",value:ht,onChange:V=>Lt(V.target.value),rows:15,placeholder:JSON.stringify({interface:{colorScheme:"system",language:"en",notifications:{enabled:!1,ntfyUrl:"https://ntfy.sh"}}},null,2),className:"font-mono text-xs"}),a.jsx("div",{className:"text-xs text-neutral-600 mt-0.5",children:"Enter partial config to update only specific fields"})]}),a.jsx(Oe,{onClick:Oa,className:"bg-neutral-800 hover:bg-neutral-700",children:"Update Config"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.configUpdateResult&&a.jsx(xt,{data:de.configUpdateResult,resultId:"configUpdateResult"})})]})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.workingDirs&&"before:-rotate-90"),onClick:()=>$t("workingDirs"),"aria-label":"Toggle Working Directories section",children:"GET /api/working-directories"}),a.jsxs("div",{className:Ne("overflow-hidden",o.workingDirs&&"hidden"),children:[a.jsx(Oe,{onClick:Dr,className:"bg-neutral-800 hover:bg-neutral-700",children:"Get Working Directories"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.workingDirsResult&&a.jsx(xt,{data:de.workingDirsResult,resultId:"workingDirsResult"})}),ke.length>0&&a.jsxs("div",{className:"mt-2.5",children:[a.jsx("h4",{className:"my-1",children:"Quick Select:"}),ke.map((V,Se)=>a.jsxs("div",{className:"mb-1",children:[a.jsx(Oe,{className:"text-xs py-0.5 px-1 mr-1 h-auto bg-neutral-800 hover:bg-neutral-700",onClick:()=>{f(V.path),z(V.path)},title:V.path,children:V.shortname}),a.jsxs("span",{className:"text-[11px] text-neutral-600",children:["(",V.conversationCount," convs, ",new Date(V.lastDate).toLocaleDateString(),")"]})]},Se))]})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.commands&&"before:-rotate-90"),onClick:()=>$t("commands"),"aria-label":"Toggle Commands API section",children:"GET /api/system/commands"}),a.jsxs("div",{className:Ne("overflow-hidden",o.commands&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"commandsWorkingDir",children:["Working Directory ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"commandsWorkingDir",type:"text",value:ot,onChange:V=>bt(V.target.value),placeholder:"/path/to/working/directory",className:"font-mono"})]}),a.jsx(Oe,{onClick:pi,className:"bg-neutral-800 hover:bg-neutral-700",children:"Get Commands"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.commandsResult&&a.jsx(xt,{data:de.commandsResult,resultId:"commandsResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.start&&"before:-rotate-90"),onClick:()=>$t("start"),"aria-label":"Toggle Start Conversation section",children:"POST /api/conversations/start"}),a.jsxs("div",{className:Ne("overflow-hidden",o.start&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"workingDir",children:["Working Directory ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Mt,{id:"workingDir",type:"text",value:c,onChange:V=>f(V.target.value),placeholder:"/Users/...",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"initialPrompt",children:["Initial Prompt ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Es,{id:"initialPrompt",value:p,onChange:V=>m(V.target.value),rows:3,placeholder:"Your prompt here...",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"model",children:["Model ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsxs(Yo,{value:h,onValueChange:g,children:[a.jsx(Jo,{id:"model",className:"font-mono",children:a.jsx(Xo,{placeholder:"Default"})}),a.jsxs(ea,{children:[a.jsx(Nt,{value:"default-model",children:"Default"}),a.jsx(Nt,{value:"claude-3-opus-20240229",children:"Claude 3 Opus"}),a.jsx(Nt,{value:"claude-3-sonnet-20240229",children:"Claude 3 Sonnet"}),a.jsx(Nt,{value:"claude-3-haiku-20240307",children:"Claude 3 Haiku"}),a.jsx(Nt,{value:"claude-3-5-sonnet-20241022",children:"Claude 3.5 Sonnet"})]})]})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"systemPrompt",children:["System Prompt ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Es,{id:"systemPrompt",value:y,onChange:V=>b(V.target.value),rows:2,placeholder:"System prompt...",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"claudeExecutablePath",children:["Claude Executable Path ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"claudeExecutablePath",type:"text",value:k,onChange:V=>w(V.target.value),placeholder:"/usr/local/bin/claude",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"permissionMode",children:["Permission Mode ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsxs(Yo,{value:S,onValueChange:j,children:[a.jsx(Jo,{id:"permissionMode",className:"font-mono",children:a.jsx(Xo,{placeholder:"Default"})}),a.jsxs(ea,{children:[a.jsx(Nt,{value:"default-mode",children:"Default"}),a.jsx(Nt,{value:"default",children:"default"}),a.jsx(Nt,{value:"acceptEdits",children:"acceptEdits"}),a.jsx(Nt,{value:"bypassPermissions",children:"bypassPermissions"}),a.jsx(Nt,{value:"plan",children:"plan"})]})]})]}),a.jsx(Oe,{onClick:$a,className:"bg-neutral-800 hover:bg-neutral-700",children:"Start Conversation"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.startResult&&a.jsx(xt,{data:de.startResult,resultId:"startResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.stop&&"before:-rotate-90"),onClick:()=>$t("stop"),"aria-label":"Toggle Stop Conversation section",children:"POST /api/conversations/:streamingId/stop"}),a.jsxs("div",{className:Ne("overflow-hidden",o.stop&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"stopStreamingId",children:["Streaming ID ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Mt,{id:"stopStreamingId",type:"text",value:R,onChange:V=>P(V.target.value),placeholder:"streaming-id",className:"font-mono"})]}),a.jsx(Oe,{onClick:Rt,className:"bg-neutral-800 hover:bg-neutral-700",children:"Stop Conversation"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.stopResult&&a.jsx(xt,{data:de.stopResult,resultId:"stopResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.list&&"before:-rotate-90"),onClick:()=>$t("list"),"aria-label":"Toggle List Conversations section",children:"GET /api/conversations"}),a.jsxs("div",{className:Ne("overflow-hidden",o.list&&"hidden"),children:[a.jsx("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:a.jsxs("div",{className:"flex gap-2.5",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"conversationsLimit",children:["Limit ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"conversationsLimit",type:"number",value:D,onChange:V=>B(V.target.value),placeholder:"20",className:"font-mono"})]}),a.jsxs("div",{className:"flex-1",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"conversationsOffset",children:["Offset ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"conversationsOffset",type:"number",value:W,onChange:V=>Y(V.target.value),placeholder:"0",className:"font-mono"})]}),a.jsxs("div",{className:"flex-1",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"conversationsProjectPath",children:["Project Path ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"conversationsProjectPath",type:"text",value:Q,onChange:V=>F(V.target.value),placeholder:"/path/to/project",className:"font-mono"})]})]})}),a.jsx(Oe,{onClick:za,className:"bg-neutral-800 hover:bg-neutral-700",children:"List Conversations"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.sidebarConversationsResult&&a.jsx(xt,{data:de.sidebarConversationsResult,resultId:"sidebarConversationsResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.rename&&"before:-rotate-90"),onClick:()=>$t("rename"),"aria-label":"Toggle Update Session section",children:"PUT /api/conversations/:sessionId/update"}),a.jsxs("div",{className:Ne("overflow-hidden",o.rename&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"renameSessionId",children:["Session ID ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsxs("select",{value:re,onChange:V=>ge(V.target.value),className:"font-mono block my-1 p-2 w-full box-border border border-neutral-300 rounded bg-white",children:[a.jsx("option",{value:"",children:"Select a session..."}),n.map(V=>{const Se=V.summary||"No summary",rt=V.sessionInfo?.custom_name||"",at=[];V.sessionInfo?.pinned&&at.push("📌"),V.sessionInfo?.archived&&at.push("📦"),V.sessionInfo?.continuation_session_id&&at.push("🔗"),V.sessionInfo?.initial_commit_head&&at.push("🔀"),V.sessionInfo?.permission_mode&&V.sessionInfo.permission_mode!=="default"&&at.push(`🔒${V.sessionInfo.permission_mode}`);const gn=at.length>0?` ${at.join("")}`:"",pt=rt?`[${rt}] ${Se}`:Se,Zn=new Date(V.updatedAt).toLocaleString(),Ht=V.toolMetrics,$r=Ht?` [📝${Ht.editCount} ✏️${Ht.writeCount} +${Ht.linesAdded} -${Ht.linesRemoved}]`:"";return a.jsxs("option",{value:V.sessionId,title:`${V.sessionId}
|
|
52
|
+
${Se}
|
|
53
|
+
Path: ${V.projectPath}
|
|
54
|
+
Updated: ${Zn}
|
|
55
|
+
|
|
56
|
+
Session Info:
|
|
57
|
+
${JSON.stringify(V.sessionInfo,null,2)}${Ht?`
|
|
58
|
+
|
|
59
|
+
Tool Metrics:
|
|
60
|
+
Edits: ${Ht.editCount}
|
|
61
|
+
Writes: ${Ht.writeCount}
|
|
62
|
+
Lines Added: ${Ht.linesAdded}
|
|
63
|
+
Lines Removed: ${Ht.linesRemoved}`:""}`,children:[V.sessionId.substring(0,8),"... - ",pt.substring(0,50),"...",gn,$r," (",Zn,")"]},V.sessionId)})]}),a.jsx(Mt,{type:"text",value:re,onChange:V=>ge(V.target.value),placeholder:"claude-session-id or select from dropdown",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"renameCustomName",children:["Custom Name ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(empty to clear)"})]}),a.jsx(Mt,{id:"renameCustomName",type:"text",value:be,onChange:V=>Pe(V.target.value),placeholder:"My Project Discussion",maxLength:200,className:"font-mono"}),a.jsxs("div",{className:"text-xs text-neutral-600 mt-0.5",children:[be.length,"/200 characters"]})]}),a.jsx("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:a.jsxs("div",{className:"flex gap-4",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Jl,{id:"sessionPinned",checked:Ze,onCheckedChange:V=>ct(V)}),a.jsx(nt,{htmlFor:"sessionPinned",className:"text-sm cursor-pointer",children:"Pinned"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Jl,{id:"sessionArchived",checked:ft,onCheckedChange:V=>Ye(V)}),a.jsx(nt,{htmlFor:"sessionArchived",className:"text-sm cursor-pointer",children:"Archived"})]})]})}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"continuationSessionId",children:["Continuation Session ID ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"continuationSessionId",type:"text",value:jt,onChange:V=>et(V.target.value),placeholder:"claude-session-id",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"initialCommitHead",children:["Initial Commit HEAD ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"initialCommitHead",type:"text",value:Kt,onChange:V=>Qt(V.target.value),placeholder:"git commit hash",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"sessionPermissionMode",children:["Permission Mode ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsxs(Yo,{value:nn,onValueChange:vt,children:[a.jsx(Jo,{id:"sessionPermissionMode",className:"font-mono",children:a.jsx(Xo,{placeholder:"Keep current"})}),a.jsxs(ea,{children:[a.jsx(Nt,{value:"keep-current",children:"Keep current"}),a.jsx(Nt,{value:"default",children:"default"}),a.jsx(Nt,{value:"acceptEdits",children:"acceptEdits"}),a.jsx(Nt,{value:"bypassPermissions",children:"bypassPermissions"}),a.jsx(Nt,{value:"plan",children:"plan"})]})]})]}),a.jsx(Oe,{onClick:bu,className:"bg-neutral-800 hover:bg-neutral-700",children:"Update Session"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.renameResult&&a.jsx(xt,{data:de.renameResult,resultId:"renameResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.permissions&&"before:-rotate-90"),onClick:()=>$t("permissions"),"aria-label":"Toggle List Permissions section",children:"GET /api/permissions"}),a.jsxs("div",{className:Ne("overflow-hidden",o.permissions&&"hidden"),children:[a.jsx("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:a.jsxs("div",{className:"flex gap-2.5",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"permissionsStreamingId",children:["Streaming ID ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsx(Mt,{id:"permissionsStreamingId",type:"text",value:Z,onChange:V=>K(V.target.value),placeholder:"streaming-id",className:"font-mono"})]}),a.jsxs("div",{className:"flex-1",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"permissionsStatus",children:["Status ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(optional)"})]}),a.jsxs(Yo,{value:O,onValueChange:J,children:[a.jsx(Jo,{id:"permissionsStatus",className:"font-mono",children:a.jsx(Xo,{placeholder:"All"})}),a.jsxs(ea,{children:[a.jsx(Nt,{value:"all",children:"All"}),a.jsx(Nt,{value:"pending",children:"Pending"}),a.jsx(Nt,{value:"approved",children:"Approved"}),a.jsx(Nt,{value:"denied",children:"Denied"})]})]})]})]})}),a.jsx(Oe,{onClick:go,className:"bg-neutral-800 hover:bg-neutral-700",children:"List Permissions"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.permissionsResult&&a.jsx(xt,{data:de.permissionsResult,resultId:"permissionsResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.permissionDecision&&"before:-rotate-90"),onClick:()=>$t("permissionDecision"),"aria-label":"Toggle Permission Decision section",children:"POST /api/permissions/:requestId/decision"}),a.jsxs("div",{className:Ne("overflow-hidden",o.permissionDecision&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"permissionRequestId",children:["Request ID ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Mt,{id:"permissionRequestId",type:"text",value:Bn,onChange:V=>rr(V.target.value),placeholder:"permission-request-id",className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"permissionDecisionBody",children:["Request Body ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Es,{id:"permissionDecisionBody",value:ae,onChange:V=>xe(V.target.value),rows:10,placeholder:JSON.stringify({action:"approve",modifiedInput:{},denyReason:""},null,2),className:"font-mono text-xs"})]}),a.jsx(Oe,{onClick:hi,className:"bg-neutral-800 hover:bg-neutral-700",children:"Make Decision"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.permissionDecisionResult&&a.jsx(xt,{data:de.permissionDecisionResult,resultId:"permissionDecisionResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.listDir&&"before:-rotate-90"),onClick:()=>$t("listDir"),"aria-label":"Toggle List Directory section",children:"GET /api/filesystem/list"}),a.jsxs("div",{className:Ne("overflow-hidden",o.listDir&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"listPath",children:["Path ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Mt,{id:"listPath",type:"text",value:T,onChange:V=>z(V.target.value),placeholder:"/absolute/path/to/directory",className:"font-mono"})]}),a.jsx("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:a.jsxs("div",{className:"flex gap-4",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Jl,{id:"listRecursive",checked:H,onCheckedChange:V=>I(V)}),a.jsx(nt,{htmlFor:"listRecursive",className:"text-sm cursor-pointer",children:"Recursive"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Jl,{id:"listRespectGitignore",checked:ie,onCheckedChange:V=>se(V)}),a.jsx(nt,{htmlFor:"listRespectGitignore",className:"text-sm cursor-pointer",children:"Respect .gitignore"})]})]})}),a.jsx(Oe,{onClick:Ha,className:"bg-neutral-800 hover:bg-neutral-700",children:"List Directory"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.listResult&&a.jsx(xt,{data:de.listResult,resultId:"listResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.readFile&&"before:-rotate-90"),onClick:()=>$t("readFile"),"aria-label":"Toggle Read File section",children:"GET /api/filesystem/read"}),a.jsxs("div",{className:Ne("overflow-hidden",o.readFile&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"readPath",children:["Path ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Mt,{id:"readPath",type:"text",value:le,onChange:V=>te(V.target.value),placeholder:"/absolute/path/to/file.txt",className:"font-mono"})]}),a.jsx(Oe,{onClick:mi,className:"bg-neutral-800 hover:bg-neutral-700",children:"Read File"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.readResult&&a.jsx(xt,{data:de.readResult,resultId:"readResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.bulkOperations&&"before:-rotate-90"),onClick:()=>$t("bulkOperations"),"aria-label":"Toggle Bulk Operations section",children:"Bulk Operations"}),a.jsx("div",{className:Ne("overflow-hidden",o.bulkOperations&&"hidden"),children:a.jsxs("div",{className:"mb-2.5",children:[a.jsx("h4",{className:"my-1",children:"Archive All Sessions"}),a.jsx("p",{className:"text-xs text-neutral-600 my-1",children:"Archive all non-archived sessions at once. This action cannot be undone."}),a.jsx(Oe,{onClick:Ba,className:"bg-red-600 hover:bg-red-700",children:"Archive All Sessions"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.archiveAllResult&&a.jsx(xt,{data:de.archiveAllResult,resultId:"archiveAllResult"})})]})})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.geminiHealth&&"before:-rotate-90"),onClick:()=>$t("geminiHealth"),"aria-label":"Toggle Gemini Health Check section",children:"GET /api/gemini/health"}),a.jsxs("div",{className:Ne("overflow-hidden",o.geminiHealth&&"hidden"),children:[a.jsx(Oe,{onClick:Un,className:"bg-neutral-800 hover:bg-neutral-700",children:"Check Gemini Health"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.geminiHealthResult&&a.jsx(xt,{data:de.geminiHealthResult,resultId:"geminiHealthResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.geminiTranscribe&&"before:-rotate-90"),onClick:()=>$t("geminiTranscribe"),"aria-label":"Toggle Gemini Transcribe section",children:"POST /api/gemini/transcribe"}),a.jsxs("div",{className:Ne("overflow-hidden",o.geminiTranscribe&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsx(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"audioFile",children:"Audio File Upload"}),a.jsx(Mt,{id:"audioFile",type:"file",accept:"audio/*",onChange:ku,className:"font-mono"}),Ft&&a.jsxs("div",{className:"text-xs text-neutral-600 mt-0.5",children:["Selected: ",Ft.name]})]}),a.jsx("div",{className:"my-2.5 text-center",children:a.jsx("span",{className:"text-neutral-600",children:"— OR —"})}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsx(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"audioBase64",children:"Base64 Audio Data"}),a.jsx(Es,{id:"audioBase64",value:Fr,onChange:V=>{sr(V.target.value),Tn(null)},rows:4,placeholder:"Base64 encoded audio data...",className:"font-mono text-xs"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"mimeType",children:["MIME Type ",a.jsx("span",{className:"text-neutral-400 text-[10px]",children:"(for base64)"})]}),a.jsxs(Yo,{value:ir,onValueChange:fi,children:[a.jsx(Jo,{id:"mimeType",className:"font-mono",children:a.jsx(Xo,{})}),a.jsxs(ea,{children:[a.jsx(Nt,{value:"audio/wav",children:"audio/wav"}),a.jsx(Nt,{value:"audio/mp3",children:"audio/mp3"}),a.jsx(Nt,{value:"audio/mpeg",children:"audio/mpeg"}),a.jsx(Nt,{value:"audio/ogg",children:"audio/ogg"}),a.jsx(Nt,{value:"audio/webm",children:"audio/webm"})]})]})]}),a.jsx(Oe,{onClick:wu,className:"bg-neutral-800 hover:bg-neutral-700",children:"Transcribe Audio"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.geminiTranscribeResult&&a.jsx(xt,{data:de.geminiTranscribeResult,resultId:"geminiTranscribeResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.geminiSummarize&&"before:-rotate-90"),onClick:()=>$t("geminiSummarize"),"aria-label":"Toggle Gemini Summarize section",children:"POST /api/gemini/summarize"}),a.jsxs("div",{className:Ne("overflow-hidden",o.geminiSummarize&&"hidden"),children:[a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"textToSummarize",children:["Text to Summarize ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Es,{id:"textToSummarize",value:Or,onChange:V=>we(V.target.value),rows:8,placeholder:"Enter text to summarize...",className:"font-mono"}),a.jsxs("div",{className:"text-xs text-neutral-600 mt-0.5",children:[Or.length," characters"]})]}),a.jsx(Oe,{onClick:In,className:"bg-neutral-800 hover:bg-neutral-700",children:"Summarize Text"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.geminiSummarizeResult&&a.jsx(xt,{data:de.geminiSummarizeResult,resultId:"geminiSummarizeResult"})})]})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:Ne("font-bold text-blue-600 text-sm mb-4 cursor-pointer select-none","before:content-['▼_'] before:inline-block before:transition-transform",o.notifications&&"before:-rotate-90"),onClick:()=>$t("notifications"),"aria-label":"Toggle Notifications section",children:"/api/notifications (status/register/unregister/test)"}),a.jsxs("div",{className:Ne("overflow-hidden",o.notifications&&"hidden"),children:[a.jsxs("div",{className:"flex flex-col gap-2 mb-2",children:[a.jsx(Oe,{onClick:mu,className:"bg-neutral-800 hover:bg-neutral-700 w-full",children:"Get Status"}),a.jsx(Oe,{onClick:hu,className:"bg-neutral-800 hover:bg-neutral-700 w-full",children:"Register Push"}),a.jsx(Oe,{onClick:gu,className:"bg-neutral-800 hover:bg-neutral-700 w-full",children:"Unregister Push"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsx(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"notifTitle",children:"Test Title"}),a.jsx(Mt,{id:"notifTitle",type:"text",value:Fe,onChange:V=>qe(V.target.value),className:"font-mono"})]}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsx(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"notifMessage",children:"Test Message"}),a.jsx(Mt,{id:"notifMessage",type:"text",value:tt,onChange:V=>gt(V.target.value),className:"font-mono"})]}),a.jsx(Oe,{onClick:zr,className:"bg-neutral-800 hover:bg-neutral-700 w-full",children:"Send Test Notification"}),a.jsxs("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:[de.notificationsStatus&&a.jsx(xt,{data:de.notificationsStatus,resultId:"notificationsStatus"}),de.notificationsRegister&&a.jsx(xt,{data:de.notificationsRegister,resultId:"notificationsRegister"}),de.notificationsUnregister&&a.jsx(xt,{data:de.notificationsUnregister,resultId:"notificationsUnregister"}),de.notificationsTest&&a.jsx(xt,{data:de.notificationsTest,resultId:"notificationsTest"})]})]})]})]}),a.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative",children:[a.jsxs("div",{className:"flex-1 overflow-y-auto p-0 box-border min-h-0",children:[a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:"font-bold text-blue-600 text-sm mb-4",children:"GET /api/conversations/:sessionId"}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"detailSessionId",children:["Session ID ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsxs("select",{value:L,onChange:V=>G(V.target.value),className:"font-mono block my-1 p-2 w-full box-border border border-neutral-300 rounded bg-white mb-1",children:[a.jsx("option",{value:"",children:"Select a session..."}),n.map(V=>{const Se=V.summary||"No summary",rt=V.sessionInfo?.custom_name||"",at=rt?`[${rt}] ${Se}`:Se,gn=new Date(V.updatedAt).toLocaleString(),pt=V.toolMetrics,Zn=pt?` [📝${pt.editCount} ✏️${pt.writeCount} +${pt.linesAdded} -${pt.linesRemoved}]`:"";return a.jsxs("option",{value:V.sessionId,title:`${V.sessionId}
|
|
64
|
+
${Se}
|
|
65
|
+
Path: ${V.projectPath}
|
|
66
|
+
Updated: ${gn}
|
|
67
|
+
|
|
68
|
+
Session Info:
|
|
69
|
+
${JSON.stringify(V.sessionInfo,null,2)}${pt?`
|
|
70
|
+
|
|
71
|
+
Tool Metrics:
|
|
72
|
+
Edits: ${pt.editCount}
|
|
73
|
+
Writes: ${pt.writeCount}
|
|
74
|
+
Lines Added: ${pt.linesAdded}
|
|
75
|
+
Lines Removed: ${pt.linesRemoved}`:""}`,children:[V.sessionId.substring(0,8),"... - ",at.substring(0,50),"...",Zn," (",gn,")"]},V.sessionId)})]}),a.jsx(Mt,{type:"text",value:L,onChange:V=>G(V.target.value),placeholder:"claude-session-id or select from dropdown",className:"font-mono"})]}),a.jsx(Oe,{onClick:vu,className:"bg-neutral-800 hover:bg-neutral-700",children:"Get Details"}),a.jsx("div",{className:"max-h-96 overflow-auto border border-neutral-300 rounded bg-neutral-50 p-2.5 mt-2.5",children:de.detailsResult&&a.jsx(xt,{data:de.detailsResult,resultId:"detailsResult"})})]}),a.jsxs("div",{className:"bg-white border-t border-b border-neutral-300 p-4 mb-0",children:[a.jsx("div",{className:"font-bold text-blue-600 text-sm mb-4",children:"GET /api/stream/:streamingId"}),a.jsxs("div",{className:"my-2.5 p-2.5 bg-neutral-50 rounded",children:[a.jsxs(nt,{className:"font-bold text-neutral-600 text-xs uppercase mb-1",htmlFor:"streamingId",children:["Streaming ID ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx(Mt,{id:"streamingId",type:"text",value:M,onChange:V=>_(V.target.value),placeholder:"streaming-id",className:"font-mono"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Oe,{onClick:()=>ho(),className:"bg-neutral-800 hover:bg-neutral-700",children:"Start Stream"}),a.jsx(Oe,{onClick:xu,className:"bg-neutral-800 hover:bg-neutral-700",children:"Stop Stream"}),a.jsx(Oe,{onClick:yu,className:"bg-neutral-800 hover:bg-neutral-700",children:"Clear"}),a.jsx(Oe,{onClick:V=>Cu(V.currentTarget),className:"bg-neutral-800 hover:bg-neutral-700",children:"Copy Stream"})]}),a.jsx("div",{className:"bg-neutral-900 text-neutral-300 p-2.5 rounded mt-2.5 max-h-96 overflow-auto text-xs leading-relaxed",ref:rs,children:Ke})]})]}),a.jsx(Lk,{isVisible:oe,onToggle:()=>ce(!oe)})]})]})}var Ra=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vE={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},bE=class{#e=vE;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ei=new bE;function wE(e){setTimeout(e,0)}var oi=typeof window>"u"||"Deno"in globalThis;function Cn(){}function kE(e,t){return typeof e=="function"?e(t):e}function ap(e){return typeof e=="number"&&e>=0&&e!==1/0}function F2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ts(e,t){return typeof e=="function"?e(t):e}function er(e,t){return typeof e=="function"?e(t):e}function f1(e,t){const{type:n="all",exact:s,fetchStatus:o,predicate:l,queryKey:c,stale:f}=e;if(c){if(s){if(t.queryHash!==sm(c,t.options))return!1}else if(!wa(t.queryKey,c))return!1}if(n!=="all"){const p=t.isActive();if(n==="active"&&!p||n==="inactive"&&p)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||o&&o!==t.state.fetchStatus||l&&!l(t))}function p1(e,t){const{exact:n,status:s,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(ba(t.options.mutationKey)!==ba(l))return!1}else if(!wa(t.options.mutationKey,l))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function sm(e,t){return(t?.queryKeyHashFn||ba)(e)}function ba(e){return JSON.stringify(e,(t,n)=>cp(n)?Object.keys(n).sort().reduce((s,o)=>(s[o]=n[o],s),{}):n)}function wa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>wa(e[n],t[n])):!1}var SE=Object.prototype.hasOwnProperty;function O2(e,t){if(e===t)return e;const n=m1(e)&&m1(t);if(!n&&!(cp(e)&&cp(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),c=l.length,f=n?new Array(c):{};let p=0;for(let m=0;m<c;m++){const h=n?m:l[m],g=e[h],y=t[h];if(g===y){f[h]=g,(n?m<o:SE.call(e,h))&&p++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){f[h]=y;continue}const b=O2(g,y);f[h]=b,b===g&&p++}return o===c&&p===o?e:f}function lp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function m1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cp(e){if(!h1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!h1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function h1(e){return Object.prototype.toString.call(e)==="[object Object]"}function CE(e){return new Promise(t=>{ei.setTimeout(t,e)})}function up(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?O2(e,t):t}function jE(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function EE(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var im=Symbol();function D2(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===im?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function z2(e,t){return typeof e=="function"?e(...t):!!e}function NE(e,t,n){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),s||(s=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var AE=class extends Ra{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!oi&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},om=new AE;function dp(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function s(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},n.reject=o=>{s({status:"rejected",reason:o}),t(o)},n}var RE=wE;function TE(){let e=[],t=0,n=f=>{f()},s=f=>{f()},o=RE;const l=f=>{t?e.push(f):o(()=>{n(f)})},c=()=>{const f=e;e=[],f.length&&o(()=>{s(()=>{f.forEach(p=>{n(p)})})})};return{batch:f=>{let p;t++;try{p=f()}finally{t--,t||c()}return p},batchCalls:f=>(...p)=>{l(()=>{f(...p)})},schedule:l,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{o=f}}}var Jt=TE(),IE=class extends Ra{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!oi&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},vc=new IE;function PE(e){return Math.min(1e3*2**e,3e4)}function $2(e){return(e??"online")==="online"?vc.isOnline():!0}var fp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function H2(e){let t=!1,n=0,s;const o=dp(),l=()=>o.status!=="pending",c=w=>{if(!l()){const S=new fp(w);y(S),e.onCancel?.(S)}},f=()=>{t=!0},p=()=>{t=!1},m=()=>om.isFocused()&&(e.networkMode==="always"||vc.isOnline())&&e.canRun(),h=()=>$2(e.networkMode)&&e.canRun(),g=w=>{l()||(s?.(),o.resolve(w))},y=w=>{l()||(s?.(),o.reject(w))},b=()=>new Promise(w=>{s=S=>{(l()||m())&&w(S)},e.onPause?.()}).then(()=>{s=void 0,l()||e.onContinue?.()}),k=()=>{if(l())return;let w;const S=n===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(j){w=Promise.reject(j)}Promise.resolve(w).then(g).catch(j=>{if(l())return;const E=e.retry??(oi?0:3),N=e.retryDelay??PE,M=typeof N=="function"?N(n,j):N,_=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,j);if(t||!_){y(j);return}n++,e.onFail?.(n,j),CE(M).then(()=>m()?void 0:b()).then(()=>{t?y(j):k()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(s?.(),o),cancelRetry:f,continueRetry:p,canStart:h,start:()=>(h()?k():b().then(k),o)}}var B2=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ap(this.gcTime)&&(this.#e=ei.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(oi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ei.clearTimeout(this.#e),this.#e=void 0)}},ME=class extends B2{#e;#t;#n;#s;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=x1(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=x1(this.options);t.data!==void 0&&(this.setState(g1(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=up(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Cn).catch(Cn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>er(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===im||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ts(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!F2(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},o=()=>{const f=D2(this.options,t),m=(()=>{const h={client:this.#s,queryKey:this.queryKey,meta:this.meta};return s(h),h})();return this.#o=!1,this.options.persister?this.options.persister(f,m,this):f(m)},c=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return s(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=H2({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof fp&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(f,p)=>{this.#i({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof fp){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...V2(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...g1(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?s:void 0,s;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Jt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function V2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function g1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function x1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var _E=class extends Ra{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=dp(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#h;#f;#p;#c;#u;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),y1(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pp(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pp(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof er(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#k(),this.#t.setOptions(this.options),t._defaulted&&!lp(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&v1(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),s&&(this.#t!==n||er(this.options.enabled,this.#t)!==er(t.enabled,this.#t)||Ts(this.options.staleTime,this.#t)!==Ts(t.staleTime,this.#t))&&this.#g();const o=this.#x();s&&(this.#t!==n||er(this.options.enabled,this.#t)!==er(t.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return FE(this,n)&&(this.#s=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,s)=>(this.trackProp(s),t?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#k();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Cn)),t}#g(){this.#b();const e=Ts(this.options.staleTime,this.#t);if(oi||this.#s.isStale||!ap(e))return;const n=F2(this.#s.dataUpdatedAt,e)+1;this.#c=ei.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(oi||er(this.options.enabled,this.#t)===!1||!ap(this.#l)||this.#l===0)&&(this.#u=ei.setInterval(()=>{(this.options.refetchIntervalInBackground||om.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#x())}#b(){this.#c&&(ei.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(ei.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,s=this.options,o=this.#s,l=this.#r,c=this.#a,p=e!==n?e.state:this.#n,{state:m}=e;let h={...m},g=!1,y;if(t._optimisticResults){const L=this.hasListeners(),G=!L&&y1(e,t),D=L&&v1(e,n,t,s);(G||D)&&(h={...h,...V2(m.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:k,status:w}=h;y=h.data;let S=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let L;o?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(L=o.data,S=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,L!==void 0&&(w="success",y=up(o?.data,L,t),g=!0)}if(t.select&&y!==void 0&&!S)if(o&&y===l?.data&&t.select===this.#h)y=this.#f;else try{this.#h=t.select,y=t.select(y),y=up(o?.data,y,t),this.#f=y,this.#i=null}catch(L){this.#i=L}this.#i&&(b=this.#i,y=this.#f,k=Date.now(),w="error");const j=h.fetchStatus==="fetching",E=w==="pending",N=w==="error",M=E&&j,_=y!==void 0,P={status:w,fetchStatus:h.fetchStatus,isPending:E,isSuccess:w==="success",isError:N,isInitialLoading:M,isLoading:M,data:y,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:k,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>p.dataUpdateCount||h.errorUpdateCount>p.errorUpdateCount,isFetching:j,isRefetching:j&&!E,isLoadingError:N&&!_,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:N&&_,isStale:am(e,t),refetch:this.refetch,promise:this.#o,isEnabled:er(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=B=>{P.status==="error"?B.reject(P.error):P.data!==void 0&&B.resolve(P.data)},G=()=>{const B=this.#o=P.promise=dp();L(B)},D=this.#o;switch(D.status){case"pending":e.queryHash===n.queryHash&&L(D);break;case"fulfilled":(P.status==="error"||P.data!==D.value)&&G();break;case"rejected":(P.status!=="error"||P.error!==D.reason)&&G();break}}return P}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#p=this.#t),lp(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!this.#m.size)return!0;const l=new Set(o??this.#m);return this.options.throwOnError&&l.add("error"),Object.keys(this.#s).some(c=>{const f=c;return this.#s[f]!==e[f]&&l.has(f)})};this.#S({listeners:n()})}#k(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#S(e){Jt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function LE(e,t){return er(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function y1(e,t){return LE(e,t)||e.state.data!==void 0&&pp(e,t,t.refetchOnMount)}function pp(e,t,n){if(er(t.enabled,e)!==!1&&Ts(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&am(e,t)}return!1}function v1(e,t,n,s){return(e!==t||er(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&am(e,n)}function am(e,t){return er(t.enabled,e)!==!1&&e.isStaleByTime(Ts(t.staleTime,e))}function FE(e,t){return!lp(e.getCurrentResult(),t)}function b1(e){return{onFetch:(t,n)=>{const s=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let h=!1;const g=k=>{NE(k,()=>t.signal,()=>h=!0)},y=D2(t.options,t.fetchOptions),b=async(k,w,S)=>{if(h)return Promise.reject();if(w==null&&k.pages.length)return Promise.resolve(k);const E=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return g(R),R})(),N=await y(E),{maxPages:M}=t.options,_=S?EE:jE;return{pages:_(k.pages,N,M),pageParams:_(k.pageParams,w,M)}};if(o&&l.length){const k=o==="backward",w=k?OE:w1,S={pages:l,pageParams:c},j=w(s,S);f=await b(S,j,k)}else{const k=e??l.length;do{const w=p===0?c[0]??s.initialPageParam:w1(s,f);if(p>0&&w==null)break;f=await b(f,w),p++}while(p<k)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=m}}}function w1(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function OE(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var DE=class extends B2{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||zE(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=H2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",o=!this.#s.canStart();try{if(s)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:o})}const l=await this.#s.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Jt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function zE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $E=class extends Ra{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const s=new DE({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){this.#e.add(e);const t=ec(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ec(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ec(e);if(typeof t=="string"){const s=this.#t.get(t)?.find(o=>o.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=ec(e);return typeof t=="string"?this.#t.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Jt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>p1(t,n))}findAll(e={}){return this.getAll().filter(t=>p1(e,t))}notify(e){Jt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Jt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Cn))))}};function ec(e){return e.options.scope?.id}var HE=class extends Ra{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const s=t.queryKey,o=t.queryHash??sm(s,t);let l=this.get(o);return l||(l=new ME({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Jt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>f1(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>f1(e,n)):t}notify(e){Jt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},BE=class{#e;#t;#n;#s;#r;#a;#o;#i;constructor(e={}){this.#e=e.queryCache||new HE,this.#t=e.mutationCache||new $E,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=om.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=vc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ts(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(s.queryHash)?.state.data,c=kE(t,l);if(c!==void 0)return this.#e.build(this,s).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return Jt.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Jt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Jt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=Jt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(s).then(Cn).catch(Cn)}invalidateQueries(e,t={}){return Jt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=Jt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Cn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Cn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ts(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Cn).catch(Cn)}fetchInfiniteQuery(e){return e.behavior=b1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Cn).catch(Cn)}ensureInfiniteQueryData(e){return e.behavior=b1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return vc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(ba(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(s=>{wa(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(ba(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(s=>{wa(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===im&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},U2=d.createContext(void 0),lm=e=>{const t=d.useContext(U2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},VE=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(U2.Provider,{value:e,children:t})),Z2=d.createContext(!1),UE=()=>d.useContext(Z2);Z2.Provider;function ZE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var WE=d.createContext(ZE()),qE=()=>d.useContext(WE),GE=(e,t,n)=>{const s=n?.state.error&&typeof e.throwOnError=="function"?z2(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},KE=e=>{d.useEffect(()=>{e.clearReset()},[e])},QE=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||z2(n,[e.error,s])),YE=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>n(s(...o)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},XE=(e,t)=>e.isLoading&&e.isFetching&&!t,JE=(e,t)=>e?.suspense&&t.isPending,k1=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function eN(e,t,n){const s=UE(),o=qE(),l=lm(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=l.getQueryCache().get(c.queryHash);c._optimisticResults=s?"isRestoring":"optimistic",YE(c),GE(c,o,f),KE(o);const p=!l.getQueryCache().get(c.queryHash),[m]=d.useState(()=>new t(l,c)),h=m.getOptimisticResult(c),g=!s&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(y=>{const b=g?m.subscribe(Jt.batchCalls(y)):Cn;return m.updateResult(),b},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),d.useEffect(()=>{m.setOptions(c)},[c,m]),JE(c,h))throw k1(c,m,o);if(QE({result:h,errorResetBoundary:o,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,h),c.experimental_prefetchInRender&&!oi&&XE(h,s)&&(p?k1(c,m,o):f?.promise)?.catch(Cn).finally(()=>{m.updateResult()}),c.notifyOnChangeProps?h:m.trackResult(h)}function bc(e,t){return eN(e,_E)}function S1({children:e}){return a.jsx("div",{className:"flex flex-col w-full h-screen overflow-hidden bg-background relative",children:a.jsx("main",{className:"flex-1 flex flex-col overflow-hidden h-full",children:e})})}const C1=5,tN=3,nN=1e3;function rN(e,t){const[n,s]=d.useState(new Map),o=d.useRef(new Map),l=d.useRef(t),c=d.useRef([]);d.useEffect(()=>{l.current=t},[t]);const f=d.useCallback(()=>{let g=0;return o.current.forEach(y=>{(y.connectionState==="connecting"||y.connectionState==="connected")&&g++}),g},[]),p=d.useCallback(g=>{const y=o.current.get(g);y&&(y.retryTimeout&&clearTimeout(y.retryTimeout),y.reader&&y.reader.cancel().catch(()=>{}),y.abortController&&y.abortController.abort(),y.connectionState="disconnected",y.reader=null,y.abortController=null,o.current.set(g,y),s(new Map(o.current)),l.current.onStreamDisconnect?.(g),m())},[]),m=d.useCallback(()=>{const g=l.current.maxConcurrentConnections||C1,y=f();for(;c.current.length>0&&y<g;){const b=c.current.shift();b&&h(b)}},[]),h=d.useCallback(async g=>{const y=o.current.get(g);if(y&&(y.connectionState==="connecting"||y.connectionState==="connected"))return;const b=l.current.maxConcurrentConnections||C1;if(f()>=b){c.current.includes(g)||c.current.push(g);return}const k=y||{streamingId:g,connectionState:"connecting",reader:null,abortController:null,retryCount:0};k.connectionState="connecting",k.abortController=new AbortController,o.current.set(g,k),s(new Map(o.current));try{const w=Xi(),S={};w&&(S.Authorization=`Bearer ${w}`);const j=await fetch(`/api/stream/${g}`,{signal:k.abortController.signal,headers:S});if(!j.ok)throw new Error(`Stream connection failed: ${j.status}`);if(!j.body)throw new Error("No response body");const E=j.body.getReader();k.reader=E,k.connectionState="connected",k.retryCount=0,o.current.set(g,k),s(new Map(o.current)),l.current.onStreamConnect?.(g);const N=new TextDecoder;let M="";for(;;){const{done:_,value:R}=await E.read();if(_)break;const P=N.decode(R,{stream:!0});M+=P;const L=M.split(`
|
|
76
|
+
`);M=L.pop()||"";for(const G of L)if(G.trim())try{let D=G;if(G.startsWith("data: ")&&(D=G.substring(6)),G.startsWith(":"))continue;const B=JSON.parse(D);k.lastEvent=B,k.lastEventTime=new Date,o.current.set(g,k),s(new Map(o.current)),l.current.onStreamMessage(g,B)}catch(D){console.error("Failed to parse stream message:",G,D)}}}catch(w){if(w.name!=="AbortError"){console.error(`Stream error for ${g}:`,w),k.connectionState="error",o.current.set(g,k),s(new Map(o.current)),l.current.onStreamError?.(g,w);const S=l.current.maxRetries||tN;if(k.retryCount<S){k.retryCount++;const j=(l.current.initialRetryDelay||nN)*Math.pow(2,k.retryCount-1);k.retryTimeout=setTimeout(()=>{h(g)},j)}}}finally{const w=o.current.get(g);w&&(w.connectionState==="connecting"||w.connectionState==="connected")&&p(g)}},[p,f]);return d.useEffect(()=>{const g=new Set(Array.from(o.current.keys())),y=new Set(e);g.forEach(b=>{y.has(b)||p(b)}),e.forEach(b=>{g.has(b)||h(b)})},[e,h,p]),d.useEffect(()=>()=>{o.current.forEach((g,y)=>{p(y)}),c.current=[]},[p]),{connections:n,getConnectionState:g=>n.get(g),reconnect:h,disconnect:p,activeConnectionCount:f()}}function sN(e,t){const n={lastEvent:e,lastEventTime:new Date().toISOString()};switch(e.type){case"connected":return{...n,currentStatus:"Running",connectionState:"connected"};case"system":if("subtype"in e&&e.subtype==="init")return{...n,currentStatus:"Initializing...",connectionState:"connected"};break;case"user":return{lastEvent:e,lastEventTime:new Date().toISOString()};case"assistant":return iN(e,n);case"result":return oN(e,n);case"closed":return{...n,currentStatus:"Closed",connectionState:"disconnected"};case"error":return{...n,currentStatus:"Error occurred",connectionState:"error"};case"permission_request":return{...n,currentStatus:"Awaiting approval..."}}return n}function iN(e,t){const n=e.message,s={...t};if(n.content&&Array.isArray(n.content)){const o=n.content.filter(l=>typeof l=="object"&&"type"in l&&l.type==="tool_use");if(o.length>0){const l=o[0];if(typeof l=="object"&&"name"in l){const c=l.name;s.currentStatus=aN(c)}}else s.currentStatus="Thinking..."}else s.currentStatus="Processing...";return s}function oN(e,t){const n={...t};switch(e.subtype){case"success":n.currentStatus="Completed",n.connectionState="disconnected";break;case"error_max_turns":n.currentStatus="Max turns reached",n.connectionState="disconnected";break;default:n.currentStatus="Finished",n.connectionState="disconnected"}return e.usage&&(n.toolMetrics={linesAdded:0,linesRemoved:0,editCount:0,writeCount:0}),n}function aN(e){return{Read:"Reading file...",Write:"Writing file...",Edit:"Editing file...",MultiEdit:"Editing multiple sections...",NotebookRead:"Reading notebook...",NotebookEdit:"Editing notebook...",Grep:"Searching files...",Glob:"Finding files...",LS:"Listing directory...",Bash:"Running command...",Task:"Running task...",WebFetch:"Fetching web content...",WebSearch:"Searching web...",TodoRead:"Reading To-Do...",TodoWrite:"Updating To-Do...",exit_plan_mode:"Finalizing plan..."}[e]||`Running ${e}...`}const W2=d.createContext(void 0);function lN({children:e}){const[t,n]=d.useState(new Map),[s,o]=d.useState([]),l=d.useRef(new Map),c=d.useCallback((k,w)=>{const S=l.current.get(k)||{connectionState:"connected",currentStatus:"Running"},j=sN(w),E={...S,...j};l.current.set(k,E),n(new Map(l.current))},[]),f=d.useCallback((k,w)=>{const j={...l.current.get(k)||{connectionState:"error",currentStatus:"Error"},connectionState:"error",currentStatus:`Error: ${w.message}`,lastEventTime:new Date().toISOString()};l.current.set(k,j),n(new Map(l.current))},[]),p=d.useCallback(k=>{const w={connectionState:"connected",currentStatus:"Running",lastEventTime:new Date().toISOString()};l.current.set(k,w),n(new Map(l.current))},[]),m=d.useCallback(k=>{const w=l.current.get(k);if(w&&w.connectionState!=="disconnected"){const S={...w,connectionState:"disconnected",lastEventTime:new Date().toISOString()};l.current.set(k,S),n(new Map(l.current))}},[]),{activeConnectionCount:h}=rN(s,{onStreamMessage:c,onStreamError:f,onStreamConnect:p,onStreamDisconnect:m,maxConcurrentConnections:5,maxRetries:3,initialRetryDelay:1e3}),g=d.useCallback(k=>{const w=k.filter(S=>S&&S.length>0);o(S=>{const j=new Set([...S,...w]);return Array.from(j)}),w.forEach(S=>{if(!l.current.has(S)){const j={connectionState:"connecting",currentStatus:"Connecting...",lastEventTime:new Date().toISOString()};l.current.set(S,j)}}),n(new Map(l.current))},[]),y=d.useCallback(k=>{o(w=>w.filter(S=>S!==k)),l.current.delete(k),n(new Map(l.current))},[]),b=d.useCallback(k=>t.get(k),[t]);return a.jsx(W2.Provider,{value:{streamStatuses:t,subscribeToStreams:g,unsubscribeFromStream:y,getStreamStatus:b,activeStreamCount:h},children:e})}function cN(){const e=d.useContext(W2);if(e===void 0)throw new Error("useStreamStatus must be used within a StreamStatusProvider");return e}const q2=d.createContext(void 0),j1=20,E1=40,Jn={all:["conversations"],list:e=>[...Jn.all,"list",e],details:e=>[...Jn.all,"details",e],directories:["workingDirectories"]},uN=3e4,dN=30*1e3;function fN({children:e}){const t=lm(),[n,s]=d.useState({archived:!1}),[o,l]=d.useState([]),[c,f]=d.useState(!1),[p,m]=d.useState(!0),{subscribeToStreams:h,getStreamStatus:g,streamStatuses:y}=cN(),b=jn.useRef(Date.now()),[k,w]=d.useState({}),[S,j]=d.useState(new Set);d.useEffect(()=>{let F=null,Z=null,K=0;const O=3e4,J=5;let T=!0,z=!1;const H=()=>{if(!T||z)return;F&&(F.close(),F=null);const ie=Xi(),se=ie?`/api/conversations/activity-stream?token=${encodeURIComponent(ie)}`:"/api/conversations/activity-stream";console.log("[SSE] Attempting to connect to activity stream..."),F=new EventSource(se);const le=setTimeout(()=>{console.log("[SSE] Timeout check - readyState:",F?.readyState,"CONNECTING:",EventSource.CONNECTING,"OPEN:",EventSource.OPEN,"CLOSED:",EventSource.CLOSED),F&&F.readyState===EventSource.CONNECTING&&(console.log("[SSE] Connection timeout, retrying..."),F.close(),F=null,I())},1e4);F.onopen=()=>{clearTimeout(le),console.log("[SSE] Activity stream connected successfully, readyState:",F?.readyState),K=0};let te={};F.onmessage=oe=>{try{const ce=JSON.parse(oe.data);if(console.log("[SSE] Message received:",ce.type),ce.type==="insights-status"){const re=ce.timestamps||{};let ge=!1;for(const[be,Pe]of Object.entries(re)){const Ze=te[be];Ze&&Pe>Ze&&(console.log("[SSE] Detected missed insight update for session:",be.slice(0,8)),ge=!0)}te=re,ge&&(console.log("[SSE] Refetching due to missed insights updates"),t.invalidateQueries({queryKey:Jn.all}))}else if(ce.type==="activity"){const{sessionId:re,recentActions:ge}=ce;ge&&Array.isArray(ge)&&w(be=>{if(ge.length>0)return{...be,[re]:ge};{const Pe={...be};return delete Pe[re],Pe}})}else if(ce.type==="insights"){const{sessionId:re,identityImage:ge,insightType:be}=ce;console.log("[SSE] Insights update received:",be,re?.slice(0,8),"hasImage:",!!ge),te[re]=new Date().toISOString(),ge&&t.setQueriesData({queryKey:Jn.all},Pe=>Pe?.conversations?{...Pe,conversations:Pe.conversations.map(Ze=>Ze.sessionId===re?{...Ze,sessionInfo:{...Ze.sessionInfo,identity_image:ge}}:Ze)}:Pe),t.invalidateQueries({queryKey:Jn.all}),t.invalidateQueries({queryKey:["insights",re]})}}catch(ce){console.error("[SSE] Failed to parse message:",ce)}},F.onerror=()=>{clearTimeout(le),F?.close(),F=null,T&&I()}},I=()=>{if(!T||z)return;if(K++,K>J){console.log("[SSE] Max reconnect attempts reached, giving up. Activity stream disabled."),z=!0;return}const ie=Math.min(1e3*Math.pow(2,K-1),O);console.log(`[SSE] Connection lost, reconnecting in ${ie}ms (attempt ${K}/${J})`),Z=setTimeout(H,ie)};return H(),()=>{T=!1,Z&&clearTimeout(Z),F?.close()}},[]);const{data:E}=bc({queryKey:Jn.directories,queryFn:async()=>{const F=await Ee.getWorkingDirectories(),Z={};return F.directories.forEach(K=>{Z[K.path]={lastDate:K.lastDate,shortname:K.shortname}}),Z},staleTime:6e4}),{data:N,isLoading:M,error:_,isFetching:R}=bc({queryKey:Jn.list(n),queryFn:async()=>{const F=await Ee.getConversations({limit:j1,offset:0,sortBy:"updated",order:"desc",...n});return{conversations:F.conversations,hasMore:F.conversations.length===j1}},placeholderData:F=>F});d.useEffect(()=>{l([]),m(N?.hasMore??!0)},[n,N?.hasMore]);const P=N?.conversations??[],L=jn.useMemo(()=>{const F=new Set(P.map(K=>K.sessionId)),Z=o.filter(K=>!F.has(K.sessionId));return[...P,...Z]},[P,o]);d.useEffect(()=>{const F=L.filter(Z=>Z.status==="ongoing"&&Z.streamingId).map(Z=>Z.streamingId);F.length>0&&h(F)},[L,h]);const G=jn.useMemo(()=>L.map(F=>{const Z=S.has(F.sessionId);if(F.streamingId&&F.status==="ongoing"){const K=g(F.streamingId);if(K)return{...F,liveStatus:K,status:K.connectionState==="disconnected"&&K.currentStatus==="Completed"?"completed":F.status}}return Z&&F.status==="completed"?{...F,status:"ongoing"}:F}),[L,y,g,S]),D=jn.useMemo(()=>{const F={};return E&&Object.assign(F,E),G.forEach(Z=>{if(Z.projectPath){const K=Z.projectPath.split("/"),O=K[K.length-1]||Z.projectPath;(!F[Z.projectPath]||new Date(Z.updatedAt)>new Date(F[Z.projectPath].lastDate))&&(F[Z.projectPath]={lastDate:Z.updatedAt,shortname:E?.[Z.projectPath]?.shortname||O})}}),F},[G,E]),B=d.useRef(new Set);d.useEffect(()=>{const F=Array.from(S).filter(Z=>!B.current.has(Z));F.length!==0&&(F.forEach(Z=>{B.current.add(Z),t.prefetchQuery({queryKey:Jn.details(Z),queryFn:()=>Ee.getConversationDetails(Z),staleTime:3e4})}),console.log("[Prefetch] Prefetching conversation details for active sessions:",F.length))},[S,t]),d.useEffect(()=>{const F={},Z={};let K=[];const J=setInterval(async()=>{if(document.visibilityState!=="visible")return;const z=L.map(H=>H.sessionId);if(z.length!==0)try{const{mtimes:H,activeSessionIds:I,insightMtimes:ie}=await Ee.checkInsightsActivity(z,F,K);K=I;let se=!1;for(const[le,te]of Object.entries(H))F[le]!==void 0&&F[le]!==te&&(se=!0),F[le]=te;if(ie)for(const[le,te]of Object.entries(ie))Z[le]!==void 0&&Z[le]!==te&&(se=!0),Z[le]=te;j(new Set(I)),se&&t.invalidateQueries({queryKey:Jn.all})}catch{}},uN),T=()=>{document.visibilityState==="visible"?Date.now()-b.current>dN&&t.invalidateQueries({queryKey:Jn.all}):b.current=Date.now()};return document.addEventListener("visibilitychange",T),()=>{clearInterval(J),document.removeEventListener("visibilitychange",T)}},[t,L]);const W=d.useCallback(async F=>{const Z=F||n;if(!(c||!p)){f(!0);try{const K=await Ee.getConversations({limit:E1,offset:L.length,sortBy:"updated",order:"desc",...Z});K.conversations.length===0?m(!1):(l(O=>{const J=new Set(O.map(z=>z.sessionId)),T=K.conversations.filter(z=>!J.has(z.sessionId));return[...O,...T]}),m(K.conversations.length===E1))}catch(K){console.error("Error loading more conversations:",K)}finally{f(!1)}}},[n,c,p,L.length]),Y=d.useCallback(()=>G.length===0?null:[...G].sort((Z,K)=>new Date(K.updatedAt).getTime()-new Date(Z.updatedAt).getTime())[0]?.projectPath||null,[G]),Q=d.useCallback(async()=>{await t.refetchQueries({queryKey:Jn.all})},[t]);return a.jsx(q2.Provider,{value:{conversations:G,loading:M,loadingMore:c,hasMore:p,error:_?"Failed to load conversations":null,recentDirectories:D,activeFilters:n,setActiveFilters:s,loadMoreConversations:W,getMostRecentWorkingDirectory:Y,invalidateConversations:Q,recentActions:k},children:e})}function cm(){const e=d.useContext(q2);if(e===void 0)throw new Error("useConversations must be used within a ConversationsProvider");return e}const G2=d.createContext(void 0);function pN({children:e}){const[t,n]=d.useState("free"),[s,o]=d.useState({maxSessions:null,insightsEnabled:!1}),[l,c]=d.useState(!1),[f,p]=d.useState(null),[m,h]=d.useState(!0),[g,y]=d.useState(null),b=d.useCallback(async()=>{try{h(!0),y(null);const j=await Ee.getLicense();n(j.tier),o(j.limits),c(j.isBetaMode),p(j.license)}catch(j){y(j instanceof Error?j:new Error("Failed to load license")),n("free"),o({maxSessions:null,insightsEnabled:!1}),c(!1),p(null)}finally{h(!1)}},[]);d.useEffect(()=>{b()},[b]);const k=d.useCallback(async j=>{try{const E=await Ee.activateLicense(j);return E.success?(await b(),{success:!0}):{success:!1,error:E.error||"Activation failed"}}catch(E){return{success:!1,error:E instanceof Error?E.message:"Activation failed"}}},[b]),w=d.useCallback(async()=>{try{await Ee.deactivateLicense(),await b()}catch(j){throw y(j instanceof Error?j:new Error("Failed to deactivate license")),j}},[b]),S=s.insightsEnabled;return a.jsx(G2.Provider,{value:{tier:t,limits:s,isBetaMode:l,license:f,isLoading:m,error:g,hasInsights:S,activateLicense:k,deactivateLicense:w,refresh:b},children:e})}function mN(){const e=d.useContext(G2);if(!e)throw new Error("useLicense must be used within a LicenseProvider");return e}function hN(){const{isBetaMode:e}=mN();return a.jsx("header",{className:"sticky top-0 z-20 flex items-center justify-between p-3 h-[60px] bg-background font-semibold",children:a.jsx("div",{className:"relative flex items-center justify-between w-full px-1 py-3",children:e&&a.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-gradient-to-r from-purple-500/10 to-blue-500/10 border border-purple-500/20",children:[a.jsx(ya,{size:12,className:"text-purple-400"}),a.jsx("span",{className:"text-xs font-medium text-purple-400",children:"Beta"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Pro features enabled"})]})})})}function gN(e){const t=xN(e),n=d.forwardRef((s,o)=>{const{children:l,...c}=s,f=d.Children.toArray(l),p=f.find(vN);if(p){const m=p.props.children,h=f.map(g=>g===p?d.Children.count(m)>1?d.Children.only(null):d.isValidElement(m)?m.props.children:null:g);return a.jsx(t,{...c,ref:o,children:d.isValidElement(m)?d.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function xN(e){const t=d.forwardRef((n,s)=>{const{children:o,...l}=n;if(d.isValidElement(o)){const c=wN(o),f=bN(l,o.props);return o.type!==d.Fragment&&(f.ref=s?nr(s,c):c),d.cloneElement(o,f)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yN=Symbol("radix.slottable");function vN(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yN}function bN(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...f)=>{const p=l(...f);return o(...f),p}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function wN(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xc="Popover",[K2]=Rr(Xc,[co]),Ta=co(),[kN,Os]=K2(Xc),Q2=e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:o,onOpenChange:l,modal:c=!1}=e,f=Ta(t),p=d.useRef(null),[m,h]=d.useState(!1),[g,y]=es({prop:s,defaultProp:o??!1,onChange:l,caller:Xc});return a.jsx(Wp,{...f,children:a.jsx(kN,{scope:t,contentId:en(),triggerRef:p,open:g,onOpenChange:y,onOpenToggle:d.useCallback(()=>y(b=>!b),[y]),hasCustomAnchor:m,onCustomAnchorAdd:d.useCallback(()=>h(!0),[]),onCustomAnchorRemove:d.useCallback(()=>h(!1),[]),modal:c,children:n})})};Q2.displayName=Xc;var Y2="PopoverAnchor",SN=d.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,o=Os(Y2,n),l=Ta(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:f}=o;return d.useEffect(()=>(c(),()=>f()),[c,f]),a.jsx($c,{...l,...s,ref:t})});SN.displayName=Y2;var X2="PopoverTrigger",J2=d.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,o=Os(X2,n),l=Ta(n),c=mt(t,o.triggerRef),f=a.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":sv(o.open),...s,ref:c,onClick:Ve(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?f:a.jsx($c,{asChild:!0,...l,children:f})});J2.displayName=X2;var um="PopoverPortal",[CN,jN]=K2(um,{forceMount:void 0}),ev=e=>{const{__scopePopover:t,forceMount:n,children:s,container:o}=e,l=Os(um,t);return a.jsx(CN,{scope:t,forceMount:n,children:a.jsx(Ir,{present:n||l.open,children:a.jsx(Hc,{asChild:!0,container:o,children:s})})})};ev.displayName=um;var to="PopoverContent",tv=d.forwardRef((e,t)=>{const n=jN(to,e.__scopePopover),{forceMount:s=n.forceMount,...o}=e,l=Os(to,e.__scopePopover);return a.jsx(Ir,{present:s||l.open,children:l.modal?a.jsx(NN,{...o,ref:t}):a.jsx(AN,{...o,ref:t})})});tv.displayName=to;var EN=gN("PopoverContent.RemoveScroll"),NN=d.forwardRef((e,t)=>{const n=Os(to,e.__scopePopover),s=d.useRef(null),o=mt(t,s),l=d.useRef(!1);return d.useEffect(()=>{const c=s.current;if(c)return Kp(c)},[]),a.jsx(Vc,{as:EN,allowPinchZoom:!0,children:a.jsx(nv,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(e.onCloseAutoFocus,c=>{c.preventDefault(),l.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ve(e.onPointerDownOutside,c=>{const f=c.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,m=f.button===2||p;l.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:Ve(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),AN=d.forwardRef((e,t)=>{const n=Os(to,e.__scopePopover),s=d.useRef(!1),o=d.useRef(!1);return a.jsx(nv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(s.current||n.triggerRef.current?.focus(),l.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=l.target;n.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),nv=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,...g}=e,y=Os(to,n),b=Ta(n);return Op(),a.jsx(Lc,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:l,children:a.jsx(Na,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>y.onOpenChange(!1),children:a.jsx(qp,{"data-state":sv(y.open),role:"dialog",id:y.contentId,...b,...g,ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),rv="PopoverClose",RN=d.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,o=Os(rv,n);return a.jsx(He.button,{type:"button",...s,ref:t,onClick:Ve(e.onClick,()=>o.onOpenChange(!1))})});RN.displayName=rv;var TN="PopoverArrow",IN=d.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,o=Ta(n);return a.jsx(Gp,{...o,...s,ref:t})});IN.displayName=TN;function sv(e){return e?"open":"closed"}var PN=Q2,MN=J2,_N=ev,iv=tv;function LN({...e}){return a.jsx(PN,{"data-slot":"popover",...e})}function FN({...e}){return a.jsx(MN,{"data-slot":"popover-trigger",...e})}const ov=d.forwardRef(({className:e,align:t="center",sideOffset:n=4,...s},o)=>a.jsx(_N,{children:a.jsx(iv,{ref:o,"data-slot":"popover-content",align:t,sideOffset:n,className:Ne("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-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...s})}));ov.displayName=iv.displayName;var N1=1,ON=.9,DN=.8,zN=.17,vf=.1,bf=.999,$N=.9999,HN=.99,BN=/[\\\/_+.#"@\[\(\{&]/,VN=/[\\\/_+.#"@\[\(\{&]/g,UN=/[\s-]/,av=/[\s-]/g;function mp(e,t,n,s,o,l,c){if(l===t.length)return o===e.length?N1:HN;var f=`${o},${l}`;if(c[f]!==void 0)return c[f];for(var p=s.charAt(l),m=n.indexOf(p,o),h=0,g,y,b,k;m>=0;)g=mp(e,t,n,s,m+1,l+1,c),g>h&&(m===o?g*=N1:BN.test(e.charAt(m-1))?(g*=DN,b=e.slice(o,m-1).match(VN),b&&o>0&&(g*=Math.pow(bf,b.length))):UN.test(e.charAt(m-1))?(g*=ON,k=e.slice(o,m-1).match(av),k&&o>0&&(g*=Math.pow(bf,k.length))):(g*=zN,o>0&&(g*=Math.pow(bf,m-o))),e.charAt(m)!==t.charAt(l)&&(g*=$N)),(g<vf&&n.charAt(m-1)===s.charAt(l+1)||s.charAt(l+1)===s.charAt(l)&&n.charAt(m-1)!==s.charAt(l))&&(y=mp(e,t,n,s,m+1,l+2,c),y*vf>g&&(g=y*vf)),g>h&&(h=g),m=n.indexOf(p,m+1);return c[f]=h,h}function A1(e){return e.toLowerCase().replace(av," ")}function ZN(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,mp(e,t,A1(e),A1(t),0,0,{})}function WN(e){const t=qN(e),n=d.forwardRef((s,o)=>{const{children:l,...c}=s,f=d.Children.toArray(l),p=f.find(KN);if(p){const m=p.props.children,h=f.map(g=>g===p?d.Children.count(m)>1?d.Children.only(null):d.isValidElement(m)?m.props.children:null:g);return a.jsx(t,{...c,ref:o,children:d.isValidElement(m)?d.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function qN(e){const t=d.forwardRef((n,s)=>{const{children:o,...l}=n;if(d.isValidElement(o)){const c=YN(o),f=QN(l,o.props);return o.type!==d.Fragment&&(f.ref=s?nr(s,c):c),d.cloneElement(o,f)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GN=Symbol("radix.slottable");function KN(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GN}function QN(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...f)=>{const p=l(...f);return o(...f),p}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function YN(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jc="Dialog",[lv]=Rr(Jc),[XN,yr]=lv(Jc),cv=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=d.useRef(null),p=d.useRef(null),[m,h]=es({prop:s,defaultProp:o??!1,onChange:l,caller:Jc});return a.jsx(XN,{scope:t,triggerRef:f,contentRef:p,contentId:en(),titleId:en(),descriptionId:en(),open:m,onOpenChange:h,onOpenToggle:d.useCallback(()=>h(g=>!g),[h]),modal:c,children:n})};cv.displayName=Jc;var uv="DialogTrigger",JN=d.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,o=yr(uv,n),l=mt(t,o.triggerRef);return a.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pm(o.open),...s,ref:l,onClick:Ve(e.onClick,o.onOpenToggle)})});JN.displayName=uv;var dm="DialogPortal",[e9,dv]=lv(dm,{forceMount:void 0}),fv=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:o}=e,l=yr(dm,t);return a.jsx(e9,{scope:t,forceMount:n,children:d.Children.map(s,c=>a.jsx(Ir,{present:n||l.open,children:a.jsx(Hc,{asChild:!0,container:o,children:c})}))})};fv.displayName=dm;var wc="DialogOverlay",pv=d.forwardRef((e,t)=>{const n=dv(wc,e.__scopeDialog),{forceMount:s=n.forceMount,...o}=e,l=yr(wc,e.__scopeDialog);return l.modal?a.jsx(Ir,{present:s||l.open,children:a.jsx(n9,{...o,ref:t})}):null});pv.displayName=wc;var t9=WN("DialogOverlay.RemoveScroll"),n9=d.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,o=yr(wc,n);return a.jsx(Vc,{as:t9,allowPinchZoom:!0,shards:[o.contentRef],children:a.jsx(He.div,{"data-state":pm(o.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),ai="DialogContent",mv=d.forwardRef((e,t)=>{const n=dv(ai,e.__scopeDialog),{forceMount:s=n.forceMount,...o}=e,l=yr(ai,e.__scopeDialog);return a.jsx(Ir,{present:s||l.open,children:l.modal?a.jsx(r9,{...o,ref:t}):a.jsx(s9,{...o,ref:t})})});mv.displayName=ai;var r9=d.forwardRef((e,t)=>{const n=yr(ai,e.__scopeDialog),s=d.useRef(null),o=mt(t,n.contentRef,s);return d.useEffect(()=>{const l=s.current;if(l)return Kp(l)},[]),a.jsx(hv,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ve(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&l.preventDefault()}),onFocusOutside:Ve(e.onFocusOutside,l=>l.preventDefault())})}),s9=d.forwardRef((e,t)=>{const n=yr(ai,e.__scopeDialog),s=d.useRef(!1),o=d.useRef(!1);return a.jsx(hv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(s.current||n.triggerRef.current?.focus(),l.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=l.target;n.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),hv=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:l,...c}=e,f=yr(ai,n),p=d.useRef(null),m=mt(t,p);return Op(),a.jsxs(a.Fragment,{children:[a.jsx(Lc,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:l,children:a.jsx(Na,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":pm(f.open),...c,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(l9,{titleId:f.titleId}),a.jsx(u9,{contentRef:p,descriptionId:f.descriptionId})]})]})}),fm="DialogTitle",i9=d.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,o=yr(fm,n);return a.jsx(He.h2,{id:o.titleId,...s,ref:t})});i9.displayName=fm;var gv="DialogDescription",o9=d.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,o=yr(gv,n);return a.jsx(He.p,{id:o.descriptionId,...s,ref:t})});o9.displayName=gv;var xv="DialogClose",a9=d.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,o=yr(xv,n);return a.jsx(He.button,{type:"button",...s,ref:t,onClick:Ve(e.onClick,()=>o.onOpenChange(!1))})});a9.displayName=xv;function pm(e){return e?"open":"closed"}var yv="DialogTitleWarning",[yO,vv]=Fk(yv,{contentName:ai,titleName:fm,docsSlug:"dialog"}),l9=({titleId:e})=>{const t=vv(yv),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
77
|
+
|
|
78
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
79
|
+
|
|
80
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},c9="DialogDescriptionWarning",u9=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vv(c9).contentName}}.`;return d.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},d9=cv,f9=fv,p9=pv,m9=mv,ta='[cmdk-group=""]',wf='[cmdk-group-items=""]',h9='[cmdk-group-heading=""]',bv='[cmdk-item=""]',R1=`${bv}:not([aria-disabled="true"])`,hp="cmdk-item-select",Zi="data-value",g9=(e,t,n)=>ZN(e,t,n),wv=d.createContext(void 0),Ia=()=>d.useContext(wv),kv=d.createContext(void 0),mm=()=>d.useContext(kv),Sv=d.createContext(void 0),Cv=d.forwardRef((e,t)=>{let n=Wi(()=>{var H,I;return{search:"",value:(I=(H=e.value)!=null?H:e.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=Wi(()=>new Set),o=Wi(()=>new Map),l=Wi(()=>new Map),c=Wi(()=>new Set),f=jv(e),{label:p,children:m,value:h,onValueChange:g,filter:y,shouldFilter:b,loop:k,disablePointerSelection:w=!1,vimBindings:S=!0,...j}=e,E=en(),N=en(),M=en(),_=d.useRef(null),R=N9();li(()=>{if(h!==void 0){let H=h.trim();n.current.value=H,P.emit()}},[h]),li(()=>{R(6,Y)},[]);let P=d.useMemo(()=>({subscribe:H=>(c.current.add(H),()=>c.current.delete(H)),snapshot:()=>n.current,setState:(H,I,ie)=>{var se,le,te,oe;if(!Object.is(n.current[H],I)){if(n.current[H]=I,H==="search")W(),D(),R(1,B);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(M);ce?ce.focus():(se=document.getElementById(E))==null||se.focus()}if(R(7,()=>{var ce;n.current.selectedItemId=(ce=Q())==null?void 0:ce.id,P.emit()}),ie||R(5,Y),((le=f.current)==null?void 0:le.value)!==void 0){let ce=I??"";(oe=(te=f.current).onValueChange)==null||oe.call(te,ce);return}}P.emit()}},emit:()=>{c.current.forEach(H=>H())}}),[]),L=d.useMemo(()=>({value:(H,I,ie)=>{var se;I!==((se=l.current.get(H))==null?void 0:se.value)&&(l.current.set(H,{value:I,keywords:ie}),n.current.filtered.items.set(H,G(I,ie)),R(2,()=>{D(),P.emit()}))},item:(H,I)=>(s.current.add(H),I&&(o.current.has(I)?o.current.get(I).add(H):o.current.set(I,new Set([H]))),R(3,()=>{W(),D(),n.current.value||B(),P.emit()}),()=>{l.current.delete(H),s.current.delete(H),n.current.filtered.items.delete(H);let ie=Q();R(4,()=>{W(),ie?.getAttribute("id")===H&&B(),P.emit()})}),group:H=>(o.current.has(H)||o.current.set(H,new Set),()=>{l.current.delete(H),o.current.delete(H)}),filter:()=>f.current.shouldFilter,label:p||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:E,inputId:M,labelId:N,listInnerRef:_}),[]);function G(H,I){var ie,se;let le=(se=(ie=f.current)==null?void 0:ie.filter)!=null?se:g9;return H?le(H,n.current.search,I):0}function D(){if(!n.current.search||f.current.shouldFilter===!1)return;let H=n.current.filtered.items,I=[];n.current.filtered.groups.forEach(se=>{let le=o.current.get(se),te=0;le.forEach(oe=>{let ce=H.get(oe);te=Math.max(ce,te)}),I.push([se,te])});let ie=_.current;F().sort((se,le)=>{var te,oe;let ce=se.getAttribute("id"),re=le.getAttribute("id");return((te=H.get(re))!=null?te:0)-((oe=H.get(ce))!=null?oe:0)}).forEach(se=>{let le=se.closest(wf);le?le.appendChild(se.parentElement===le?se:se.closest(`${wf} > *`)):ie.appendChild(se.parentElement===ie?se:se.closest(`${wf} > *`))}),I.sort((se,le)=>le[1]-se[1]).forEach(se=>{var le;let te=(le=_.current)==null?void 0:le.querySelector(`${ta}[${Zi}="${encodeURIComponent(se[0])}"]`);te?.parentElement.appendChild(te)})}function B(){let H=F().find(ie=>ie.getAttribute("aria-disabled")!=="true"),I=H?.getAttribute(Zi);P.setState("value",I||void 0)}function W(){var H,I,ie,se;if(!n.current.search||f.current.shouldFilter===!1){n.current.filtered.count=s.current.size;return}n.current.filtered.groups=new Set;let le=0;for(let te of s.current){let oe=(I=(H=l.current.get(te))==null?void 0:H.value)!=null?I:"",ce=(se=(ie=l.current.get(te))==null?void 0:ie.keywords)!=null?se:[],re=G(oe,ce);n.current.filtered.items.set(te,re),re>0&&le++}for(let[te,oe]of o.current)for(let ce of oe)if(n.current.filtered.items.get(ce)>0){n.current.filtered.groups.add(te);break}n.current.filtered.count=le}function Y(){var H,I,ie;let se=Q();se&&(((H=se.parentElement)==null?void 0:H.firstChild)===se&&((ie=(I=se.closest(ta))==null?void 0:I.querySelector(h9))==null||ie.scrollIntoView({block:"nearest"})),se.scrollIntoView({block:"nearest"}))}function Q(){var H;return(H=_.current)==null?void 0:H.querySelector(`${bv}[aria-selected="true"]`)}function F(){var H;return Array.from(((H=_.current)==null?void 0:H.querySelectorAll(R1))||[])}function Z(H){let I=F()[H];I&&P.setState("value",I.getAttribute(Zi))}function K(H){var I;let ie=Q(),se=F(),le=se.findIndex(oe=>oe===ie),te=se[le+H];(I=f.current)!=null&&I.loop&&(te=le+H<0?se[se.length-1]:le+H===se.length?se[0]:se[le+H]),te&&P.setState("value",te.getAttribute(Zi))}function O(H){let I=Q(),ie=I?.closest(ta),se;for(;ie&&!se;)ie=H>0?j9(ie,ta):E9(ie,ta),se=ie?.querySelector(R1);se?P.setState("value",se.getAttribute(Zi)):K(H)}let J=()=>Z(F().length-1),T=H=>{H.preventDefault(),H.metaKey?J():H.altKey?O(1):K(1)},z=H=>{H.preventDefault(),H.metaKey?Z(0):H.altKey?O(-1):K(-1)};return d.createElement(He.div,{ref:t,tabIndex:-1,...j,"cmdk-root":"",onKeyDown:H=>{var I;(I=j.onKeyDown)==null||I.call(j,H);let ie=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||ie))switch(H.key){case"n":case"j":{S&&H.ctrlKey&&T(H);break}case"ArrowDown":{T(H);break}case"p":case"k":{S&&H.ctrlKey&&z(H);break}case"ArrowUp":{z(H);break}case"Home":{H.preventDefault(),Z(0);break}case"End":{H.preventDefault(),J();break}case"Enter":{H.preventDefault();let se=Q();if(se){let le=new Event(hp);se.dispatchEvent(le)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:R9},p),eu(e,H=>d.createElement(kv.Provider,{value:P},d.createElement(wv.Provider,{value:L},H))))}),x9=d.forwardRef((e,t)=>{var n,s;let o=en(),l=d.useRef(null),c=d.useContext(Sv),f=Ia(),p=jv(e),m=(s=(n=p.current)==null?void 0:n.forceMount)!=null?s:c?.forceMount;li(()=>{if(!m)return f.item(o,c?.id)},[m]);let h=Ev(o,l,[e.value,e.children,l],e.keywords),g=mm(),y=_s(R=>R.value&&R.value===h.current),b=_s(R=>m||f.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);d.useEffect(()=>{let R=l.current;if(!(!R||e.disabled))return R.addEventListener(hp,k),()=>R.removeEventListener(hp,k)},[b,e.onSelect,e.disabled]);function k(){var R,P;w(),(P=(R=p.current).onSelect)==null||P.call(R,h.current)}function w(){g.setState("value",h.current,!0)}if(!b)return null;let{disabled:S,value:j,onSelect:E,forceMount:N,keywords:M,..._}=e;return d.createElement(He.div,{ref:nr(l,t),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!y,"data-disabled":!!S,"data-selected":!!y,onPointerMove:S||f.getDisablePointerSelection()?void 0:w,onClick:S?void 0:k},e.children)}),y9=d.forwardRef((e,t)=>{let{heading:n,children:s,forceMount:o,...l}=e,c=en(),f=d.useRef(null),p=d.useRef(null),m=en(),h=Ia(),g=_s(b=>o||h.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);li(()=>h.group(c),[]),Ev(c,f,[e.value,e.heading,p]);let y=d.useMemo(()=>({id:c,forceMount:o}),[o]);return d.createElement(He.div,{ref:nr(f,t),...l,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&d.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:m},n),eu(e,b=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?m:void 0},d.createElement(Sv.Provider,{value:y},b))))}),v9=d.forwardRef((e,t)=>{let{alwaysRender:n,...s}=e,o=d.useRef(null),l=_s(c=>!c.search);return!n&&!l?null:d.createElement(He.div,{ref:nr(o,t),...s,"cmdk-separator":"",role:"separator"})}),b9=d.forwardRef((e,t)=>{let{onValueChange:n,...s}=e,o=e.value!=null,l=mm(),c=_s(m=>m.search),f=_s(m=>m.selectedItemId),p=Ia();return d.useEffect(()=>{e.value!=null&&l.setState("search",e.value)},[e.value]),d.createElement(He.input,{ref:t,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":f,id:p.inputId,type:"text",value:o?e.value:c,onChange:m=>{o||l.setState("search",m.target.value),n?.(m.target.value)}})}),w9=d.forwardRef((e,t)=>{let{children:n,label:s="Suggestions",...o}=e,l=d.useRef(null),c=d.useRef(null),f=_s(m=>m.selectedItemId),p=Ia();return d.useEffect(()=>{if(c.current&&l.current){let m=c.current,h=l.current,g,y=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=m.offsetHeight;h.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return y.observe(m),()=>{cancelAnimationFrame(g),y.unobserve(m)}}},[]),d.createElement(He.div,{ref:nr(l,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":s,id:p.listId},eu(e,m=>d.createElement("div",{ref:nr(c,p.listInnerRef),"cmdk-list-sizer":""},m)))}),k9=d.forwardRef((e,t)=>{let{open:n,onOpenChange:s,overlayClassName:o,contentClassName:l,container:c,...f}=e;return d.createElement(d9,{open:n,onOpenChange:s},d.createElement(f9,{container:c},d.createElement(p9,{"cmdk-overlay":"",className:o}),d.createElement(m9,{"aria-label":e.label,"cmdk-dialog":"",className:l},d.createElement(Cv,{ref:t,...f}))))}),S9=d.forwardRef((e,t)=>_s(n=>n.filtered.count===0)?d.createElement(He.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),C9=d.forwardRef((e,t)=>{let{progress:n,children:s,label:o="Loading...",...l}=e;return d.createElement(He.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},eu(e,c=>d.createElement("div",{"aria-hidden":!0},c)))}),ts=Object.assign(Cv,{List:w9,Item:x9,Input:b9,Group:y9,Separator:v9,Dialog:k9,Empty:S9,Loading:C9});function j9(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function E9(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function jv(e){let t=d.useRef(e);return li(()=>{t.current=e}),t}var li=typeof window>"u"?d.useEffect:d.useLayoutEffect;function Wi(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function _s(e){let t=mm(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function Ev(e,t,n,s=[]){let o=d.useRef(),l=Ia();return li(()=>{var c;let f=(()=>{var m;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(m=h.current.textContent)==null?void 0:m.trim():o.current}})(),p=s.map(m=>m.trim());l.value(e,f,p),(c=t.current)==null||c.setAttribute(Zi,f),o.current=f}),o}var N9=()=>{let[e,t]=d.useState(),n=Wi(()=>new Map);return li(()=>{n.current.forEach(s=>s()),n.current=new Map},[e]),(s,o)=>{n.current.set(s,o),t({})}};function A9(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function eu({asChild:e,children:t},n){return e&&d.isValidElement(t)?d.cloneElement(A9(t),{ref:t.ref},n(t.props.children)):n(t)}var R9={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Nv=d.forwardRef(({className:e,...t},n)=>a.jsx(ts,{ref:n,"data-slot":"command",className:Ne("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));Nv.displayName=ts.displayName;const Av=d.forwardRef(({className:e,...t},n)=>a.jsx("div",{"data-slot":"command-input-wrapper",className:"flex h-9 w-full",children:a.jsx(ts.Input,{ref:n,"data-slot":"command-input",className:Ne("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})}));Av.displayName=ts.Input.displayName;function T9({className:e,...t}){return a.jsx(ts.List,{"data-slot":"command-list",className:Ne("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function I9({...e}){return a.jsx(ts.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function P9({className:e,...t}){return a.jsx(ts.Group,{"data-slot":"command-group",className:Ne("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}const Rv=d.forwardRef(({className:e,...t},n)=>a.jsx(ts.Item,{ref:n,"data-slot":"command-item",className:Ne("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t}));Rv.displayName=ts.Item.displayName;const hm=d.forwardRef(function({options:t,value:n,onChange:s,placeholder:o="Select an option",showFilterInput:l=!0,filterTextRef:c,isOpen:f,onOpenChange:p,renderOption:m,className:h,dropdownClassName:g,maxHeight:y=360,position:b="absolute",filterPredicate:k,renderTrigger:w,customFilterInput:S,maxVisibleItems:j=-1,initialFocusedIndex:E,onFocusReturn:N,visualFocusOnly:M=!1,focusedIndexControlled:_},R){const[P,L]=d.useState(!1),[G,D]=d.useState(""),[B,W]=d.useState(-1),Y=d.useRef(null),Q=d.useRef(null),F=d.useRef([]),Z=d.useRef(null),K=f!==void 0?f:P,O=d.useCallback(re=>{f===void 0&&L(re),p?.(re)},[f,p]),J=d.useRef(null),T=d.useRef(null),z=d.useCallback(re=>{Y.current=re,J.current=re,R&&(typeof R=="function"?R(re):R.current=re)},[R,J]),H=d.useCallback(()=>c?.current?c.current.value:G,[G,c]),I=(re,ge)=>{const be=re.toLowerCase(),Pe=ge.toLowerCase();let Ze=0;for(let ct=0;ct<be.length&&Ze<Pe.length;ct++)be[ct]===Pe[Ze]&&Ze++;return Ze===Pe.length},ie=d.useCallback((re,ge)=>!ge.trim()||re.label.toLowerCase().includes(ge.toLowerCase())?!0:I(re.label,ge),[]),se=(re,ge)=>{const be=re.toLowerCase(),Pe=ge.toLowerCase();if(be===Pe)return-1e3;const Ze=be.indexOf(Pe);if(Ze!==-1)return Ze;let ct=1e3,ft=0,Ye=-1;for(let jt=0;jt<be.length&&ft<Pe.length;jt++)be[jt]===Pe[ft]&&(Ye!==-1&&(ct+=(jt-Ye-1)*10),Ye=jt,ft++);return ft!==Pe.length?1/0:ct},le=(()=>{const re=H();if(!re.trim())return t;const ge=k||ie,be=t.filter(Pe=>ge(Pe,re));return k?be:be.sort((Pe,Ze)=>{const ct=se(Pe.label,re),ft=se(Ze.label,re);return ct-ft})})(),te=j===-1?le:le.slice(0,j);d.useEffect(()=>{K&&l&&Q.current&&!M&&Q.current.focus()},[K,l,M]),d.useEffect(()=>{M||(B>=0&&B<F.current.length?F.current[B]?.focus():B===-1&&l&&Q.current&&Q.current.focus())},[B,l,M]),d.useEffect(()=>{_!==void 0&&W(_)},[_]),d.useEffect(()=>{K?K&&E!==void 0&&W(E):(W(-1),D(""))},[K,E]),d.useEffect(()=>{W(-1)},[G,c]);const oe=re=>{switch(re.key){case"ArrowDown":re.preventDefault(),B<te.length-1&&W(B+1);break;case"ArrowUp":re.preventDefault(),B>0?W(B-1):B===0&&!l&&N&&N();break;case"Enter":if(re.preventDefault(),B>=0&&B<te.length){const ge=te[B];ge.disabled||(s(ge.value),O(!1))}else B===-1&&G.trim()&&(s(G.trim()),O(!1));break;case"Escape":re.preventDefault(),O(!1);break;case"p":re.ctrlKey&&(re.preventDefault(),B>-1&&W(B-1));break;case"n":re.ctrlKey&&(re.preventDefault(),B<te.length-1&&W(B+1));break}},ce=re=>{re.disabled||(s(re.value),O(!1))};return a.jsxs(LN,{open:K,onOpenChange:O,children:[a.jsx(FN,{asChild:!0,children:a.jsx("div",{ref:z,className:h,children:w({isOpen:K,value:n,onClick:()=>O(!K)})})}),a.jsx(ov,{className:Ne("w-80 p-0 rounded-[18px] border border-black/15 bg-white shadow-lg","dark:border-white/10 dark:bg-neutral-900 dark:shadow-2xl",g),align:"start",sideOffset:5,avoidCollisions:!0,onKeyDown:oe,ref:T,onOpenAutoFocus:re=>{M&&re.preventDefault()},onCloseAutoFocus:re=>{M&&(re.preventDefault(),N?.())},style:{maxHeight:`${y}px`},children:a.jsxs(Nv,{className:"bg-transparent",ref:Z,children:[S?a.jsxs(a.Fragment,{children:[S,a.jsx("div",{className:"h-px bg-black/15 dark:bg-white/10 w-full"})]}):l&&!c&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-transparent",children:[a.jsx(Av,{ref:Q,placeholder:o,value:G,onValueChange:D,className:"flex-1 bg-transparent border-none rounded-lg px-2 py-1 text-sm text-neutral-900 dark:text-neutral-100 outline-none transition-all placeholder:text-neutral-500 dark:placeholder:text-neutral-400","aria-label":"Filter options","aria-autocomplete":"list","aria-controls":"dropdown-options"}),G.trim()&&a.jsx(Oe,{type:"button",variant:"ghost",size:"sm",className:"p-1 h-auto rounded-full hover:bg-transparent",onClick:()=>{s(G.trim()),O(!1)},"aria-label":"Select input text",children:a.jsx(b2,{size:18})})]}),a.jsx("div",{className:"h-px bg-black/15 dark:bg-white/10 w-full"})]}),a.jsxs(T9,{id:"dropdown-options",className:"overflow-y-auto p-1.5 scrollbar-thin scrollbar-thumb-black/20 dark:scrollbar-thumb-white/20 scrollbar-track-transparent",role:"listbox","aria-label":"Available options",children:[a.jsx(I9,{className:"py-6 text-center text-sm text-neutral-500 dark:text-neutral-400",role:"status",children:"No options found"}),a.jsx(P9,{children:te.map((re,ge)=>a.jsxs(Rv,{ref:be=>{F.current[ge]=be},value:re.label,onSelect:()=>ce(re),disabled:re.disabled,className:Ne("flex items-center justify-between w-full px-3 py-2.5 rounded-[10px] cursor-pointer transition-all gap-4 text-left text-sm text-neutral-900 dark:text-neutral-100 mb-px","hover:bg-black/5 dark:hover:bg-white/5","focus:bg-black/5 dark:focus:bg-white/5 focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed",n===re.value&&"bg-transparent dark:bg-transparent",B===ge&&"bg-black/5 dark:bg-white/5"),role:"option","aria-selected":n===re.value,"aria-disabled":re.disabled,children:[a.jsx("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:m?m(re):a.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap direction-rtl text-left",children:re.label})}),n===re.value&&a.jsx("div",{className:"flex items-center justify-center min-w-[20px] text-neutral-900 dark:text-neutral-100",children:a.jsx($n,{size:16})})]},String(re.value)))})]})]})})]})});function Qi(e,t){if(!e)return e;if(t&&e.startsWith(t)){const s=e.slice(t.length),o=s.startsWith("/")?s.slice(1):s;return o?`./${o}`:"./"}const n=["/home/","/Users/"];for(const s of n)if(e.startsWith(s))return`~${e.slice(s.length-1)}`;return e}function kc(e){if(!e)return 0;const t=(e.match(/\n/g)||[]).length;return e.length>0?t+1:0}function M9(e,t=50){if(!e||typeof e!="object")return String(e||"");const n=Object.entries(e);if(n.length===0)return"";if(n.length===1&&n[0][0]==="plan"){const o=n[0][1];if(typeof o=="string"){const l=o.split(`
|
|
81
|
+
`)[0].trim();return l.length>t?`"${l.slice(0,t)}..."`:`"${l}"`}}if(n.length===1){const[o,l]=n[0],c=typeof l=="string"&&l.length>t?`"${l.slice(0,t)}..."`:typeof l=="string"?`"${l}"`:String(l);return`${o}: ${c}`}const s=n.map(([o,l])=>{const c=typeof l=="string"&&l.length>t?`"${l.slice(0,t)}..."`:typeof l=="string"?`"${l}"`:String(l);return`${o}: ${c}`}).join(", ");return s.length>t?`${s.slice(0,t)}...`:s}function _9(e){if(!e)return 0;const t=e.split(`
|
|
82
|
+
`).filter(s=>s.trim().length>0);return t.filter(s=>s.match(/^\s*-\s+/)).length||t.length}function L9(e){try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>n&&typeof n=="object"&&typeof n.content=="string"&&typeof n.status=="string")}catch(t){console.warn("Failed to parse todos:",t)}return[]}function kf(e){try{return new URL(e).hostname}catch{return e}}function Tv({toolName:e,toolInput:t,workingDirectory:n,onClick:s}){const l=(()=>{switch(e){case"Read":case"Edit":case"MultiEdit":case"Write":case"Grep":case"Glob":case"LS":case"Bash":return null;case"TodoRead":case"TodoWrite":return null;case"WebSearch":return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-semibold",children:"Web Search"}),a.jsxs("span",{className:"font-normal",children:['("',t.query||"",'")']})]});case"WebFetch":return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-semibold",children:"Fetch"}),a.jsxs("span",{className:"font-normal",children:["(",t.url||"",")"]})]});case"Task":return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-semibold",children:"Task"}),a.jsxs("span",{className:"font-normal",children:["(",t.description||"",")"]})]});case"exit_plan_mode":case"ExitPlanMode":return a.jsx("span",{className:"font-semibold",children:"Plan"});default:return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-semibold",children:e}),a.jsxs("span",{className:"font-normal",children:["(",M9(t),")"]})]})}})();return l===null?null:a.jsx("div",{className:`text-sm font-mono text-foreground mb-1 ${s?"cursor-pointer":""}`,onClick:s,"aria-label":`Tool: ${e}`,children:l})}const F9={".js":"javascript",".jsx":"jsx",".ts":"typescript",".tsx":"tsx",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyw":"python",".pyi":"python",".html":"html",".htm":"html",".xml":"xml",".css":"css",".scss":"scss",".sass":"sass",".less":"less",".json":"json",".yaml":"yaml",".yml":"yaml",".toml":"toml",".ini":"ini",".sh":"bash",".bash":"bash",".zsh":"bash",".fish":"bash",".c":"c",".h":"c",".cpp":"cpp",".cc":"cpp",".cxx":"cpp",".hpp":"cpp",".hxx":"cpp",".java":"java",".kt":"kotlin",".kts":"kotlin",".go":"go",".rs":"rust",".rb":"ruby",".rake":"ruby",".php":"php",".phtml":"php",".swift":"swift",".mm":"objectivec",".cs":"csharp",".sql":"sql",".md":"markdown",".markdown":"markdown",".dockerfile":"dockerfile",".makefile":"makefile",".mk":"makefile",".vim":"vim",".vimrc":"vim",".lua":"lua",".r":"r",".R":"r",".scala":"scala",".sc":"scala",".clj":"clojure",".cljs":"clojure",".cljc":"clojure",".hs":"haskell",".lhs":"haskell",".ex":"elixir",".exs":"elixir",".erl":"erlang",".hrl":"erlang",".ml":"ocaml",".mli":"ocaml",".fs":"fsharp",".fsi":"fsharp",".fsx":"fsharp",".dart":"dart",".pl":"perl",".pm":"perl",".groovy":"groovy",".gradle":"groovy",".tex":"latex",".latex":"latex",".m":"matlab",".mat":"matlab",".ps1":"powershell",".psm1":"powershell",".psd1":"powershell",".asm":"asm",".s":"asm",".glsl":"glsl",".vert":"glsl",".frag":"glsl",".graphql":"graphql",".gql":"graphql",".prisma":"prisma",".sol":"solidity",".vue":"vue",".svelte":"svelte",".nix":"nix",".jl":"julia",".zig":"zig",".vsh":"v",".cr":"crystal",".nim":"nim",".nims":"nim",".d":"d",".di":"d",".pas":"pascal",".pp":"pascal",".inc":"pascal",".f":"fortran",".for":"fortran",".f90":"fortran",".f95":"fortran",".cob":"cobol",".cbl":"cobol",".ada":"ada",".adb":"ada",".ads":"ada",".pro":"prolog",".P":"prolog",".scm":"scheme",".ss":"scheme",".rkt":"racket",".lisp":"lisp",".lsp":"lisp",".cl":"lisp",".tcl":"tcl",".awk":"awk",".sas":"sas",".vhd":"vhdl",".vhdl":"vhdl",".v":"verilog",".vh":"verilog",".sv":"verilog",".wat":"wasm",".wast":"wasm"},T1={Dockerfile:"dockerfile",Makefile:"makefile",Rakefile:"ruby",Gemfile:"ruby",".gitignore":"gitignore",".gitattributes":"gitignore",".npmignore":"gitignore",".dockerignore":"gitignore",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash","nginx.conf":"nginx","httpd.conf":"apache",".htaccess":"apache"};function gm(e){if(!e)return"text";const t=e.split("/"),n=t[t.length-1];if(T1[n])return T1[n];const s=n.lastIndexOf(".");if(s===-1||s===0)return"text";const o=n.slice(s).toLowerCase();return F9[o]||"text"}var O9=Object.create,tu=Object.defineProperty,D9=Object.defineProperties,z9=Object.getOwnPropertyDescriptor,$9=Object.getOwnPropertyDescriptors,Iv=Object.getOwnPropertyNames,Sc=Object.getOwnPropertySymbols,H9=Object.getPrototypeOf,xm=Object.prototype.hasOwnProperty,Pv=Object.prototype.propertyIsEnumerable,I1=(e,t,n)=>t in e?tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nr=(e,t)=>{for(var n in t||(t={}))xm.call(t,n)&&I1(e,n,t[n]);if(Sc)for(var n of Sc(t))Pv.call(t,n)&&I1(e,n,t[n]);return e},nu=(e,t)=>D9(e,$9(t)),Mv=(e,t)=>{var n={};for(var s in e)xm.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&Sc)for(var s of Sc(e))t.indexOf(s)<0&&Pv.call(e,s)&&(n[s]=e[s]);return n},B9=(e,t)=>function(){return t||(0,e[Iv(e)[0]])((t={exports:{}}).exports,t),t.exports},V9=(e,t)=>{for(var n in t)tu(e,n,{get:t[n],enumerable:!0})},U9=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Iv(t))!xm.call(e,o)&&o!==n&&tu(e,o,{get:()=>t[o],enumerable:!(s=z9(t,o))||s.enumerable});return e},Z9=(e,t,n)=>(n=e!=null?O9(H9(e)):{},U9(!e||!e.__esModule?tu(n,"default",{value:e,enumerable:!0}):n,e)),W9=B9({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=(function(){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},c={util:{encode:function k(w){return w instanceof f?new f(w.type,k(w.content),w.alias):Array.isArray(w)?w.map(k):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(k){return Object.prototype.toString.call(k).slice(8,-1)},objId:function(k){return k.__id||Object.defineProperty(k,"__id",{value:++o}),k.__id},clone:function k(w,S){S=S||{};var j,E;switch(c.util.type(w)){case"Object":if(E=c.util.objId(w),S[E])return S[E];j={},S[E]=j;for(var N in w)w.hasOwnProperty(N)&&(j[N]=k(w[N],S));return j;case"Array":return E=c.util.objId(w),S[E]?S[E]:(j=[],S[E]=j,w.forEach(function(M,_){j[_]=k(M,S)}),j);default:return w}},getLanguage:function(k){for(;k;){var w=s.exec(k.className);if(w)return w[1].toLowerCase();k=k.parentElement}return"none"},setLanguage:function(k,w){k.className=k.className.replace(RegExp(s,"gi"),""),k.classList.add("language-"+w)},isActive:function(k,w,S){for(var j="no-"+w;k;){var E=k.classList;if(E.contains(w))return!0;if(E.contains(j))return!1;k=k.parentElement}return!!S}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(k,w){var S=c.util.clone(c.languages[k]);for(var j in w)S[j]=w[j];return S},insertBefore:function(k,w,S,j){j=j||c.languages;var E=j[k],N={};for(var M in E)if(E.hasOwnProperty(M)){if(M==w)for(var _ in S)S.hasOwnProperty(_)&&(N[_]=S[_]);S.hasOwnProperty(M)||(N[M]=E[M])}var R=j[k];return j[k]=N,c.languages.DFS(c.languages,function(P,L){L===R&&P!=k&&(this[P]=N)}),N},DFS:function k(w,S,j,E){E=E||{};var N=c.util.objId;for(var M in w)if(w.hasOwnProperty(M)){S.call(w,M,w[M],j||M);var _=w[M],R=c.util.type(_);R==="Object"&&!E[N(_)]?(E[N(_)]=!0,k(_,S,null,E)):R==="Array"&&!E[N(_)]&&(E[N(_)]=!0,k(_,S,M,E))}}},plugins:{},highlight:function(k,w,S){var j={code:k,grammar:w,language:S};if(c.hooks.run("before-tokenize",j),!j.grammar)throw new Error('The language "'+j.language+'" has no grammar.');return j.tokens=c.tokenize(j.code,j.grammar),c.hooks.run("after-tokenize",j),f.stringify(c.util.encode(j.tokens),j.language)},tokenize:function(k,w){var S=w.rest;if(S){for(var j in S)w[j]=S[j];delete w.rest}var E=new h;return g(E,E.head,k),m(k,E,w,E.head,0),b(E)},hooks:{all:{},add:function(k,w){var S=c.hooks.all;S[k]=S[k]||[],S[k].push(w)},run:function(k,w){var S=c.hooks.all[k];if(!(!S||!S.length))for(var j=0,E;E=S[j++];)E(w)}},Token:f};function f(k,w,S,j){this.type=k,this.content=w,this.alias=S,this.length=(j||"").length|0}f.stringify=function k(w,S){if(typeof w=="string")return w;if(Array.isArray(w)){var j="";return w.forEach(function(R){j+=k(R,S)}),j}var E={type:w.type,content:k(w.content,S),tag:"span",classes:["token",w.type],attributes:{},language:S},N=w.alias;N&&(Array.isArray(N)?Array.prototype.push.apply(E.classes,N):E.classes.push(N)),c.hooks.run("wrap",E);var M="";for(var _ in E.attributes)M+=" "+_+'="'+(E.attributes[_]||"").replace(/"/g,""")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+M+">"+E.content+"</"+E.tag+">"};function p(k,w,S,j){k.lastIndex=w;var E=k.exec(S);if(E&&j&&E[1]){var N=E[1].length;E.index+=N,E[0]=E[0].slice(N)}return E}function m(k,w,S,j,E,N){for(var M in S)if(!(!S.hasOwnProperty(M)||!S[M])){var _=S[M];_=Array.isArray(_)?_:[_];for(var R=0;R<_.length;++R){if(N&&N.cause==M+","+R)return;var P=_[R],L=P.inside,G=!!P.lookbehind,D=!!P.greedy,B=P.alias;if(D&&!P.pattern.global){var W=P.pattern.toString().match(/[imsuy]*$/)[0];P.pattern=RegExp(P.pattern.source,W+"g")}for(var Y=P.pattern||P,Q=j.next,F=E;Q!==w.tail&&!(N&&F>=N.reach);F+=Q.value.length,Q=Q.next){var Z=Q.value;if(w.length>k.length)return;if(!(Z instanceof f)){var K=1,O;if(D){if(O=p(Y,F,k,G),!O||O.index>=k.length)break;var H=O.index,J=O.index+O[0].length,T=F;for(T+=Q.value.length;H>=T;)Q=Q.next,T+=Q.value.length;if(T-=Q.value.length,F=T,Q.value instanceof f)continue;for(var z=Q;z!==w.tail&&(T<J||typeof z.value=="string");z=z.next)K++,T+=z.value.length;K--,Z=k.slice(F,T),O.index-=F}else if(O=p(Y,0,Z,G),!O)continue;var H=O.index,I=O[0],ie=Z.slice(0,H),se=Z.slice(H+I.length),le=F+Z.length;N&&le>N.reach&&(N.reach=le);var te=Q.prev;ie&&(te=g(w,te,ie),F+=ie.length),y(w,te,K);var oe=new f(M,L?c.tokenize(I,L):I,B,I);if(Q=g(w,te,oe),se&&g(w,Q,se),K>1){var ce={cause:M+","+R,reach:le};m(k,w,S,Q.prev,F,ce),N&&ce.reach>N.reach&&(N.reach=ce.reach)}}}}}}function h(){var k={value:null,prev:null,next:null},w={value:null,prev:k,next:null};k.next=w,this.head=k,this.tail=w,this.length=0}function g(k,w,S){var j=w.next,E={value:S,prev:w,next:j};return w.next=E,j.prev=E,k.length++,E}function y(k,w,S){for(var j=w.next,E=0;E<S&&j!==k.tail;E++)j=j.next;w.next=j,j.prev=w,k.length-=E}function b(k){for(var w=[],S=k.head.next;S!==k.tail;)w.push(S.value),S=S.next;return w}return c})();t.exports=n,n.default=n}}),ue=Z9(W9());ue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ue.languages.markup.tag.inside["attr-value"].inside.entity=ue.languages.markup.entity,ue.languages.markup.doctype.inside["internal-subset"].inside=ue.languages.markup,ue.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(ue.languages.markup.tag,"addInlined",{value:function(e,s){var n={},n=(n["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ue.languages[s]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),s=(n["language-"+s]={pattern:/[\s\S]+/,inside:ue.languages[s]},{});s[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},ue.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(ue.languages.markup.tag,"addAttribute",{value:function(e,t){ue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:ue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ue.languages.html=ue.languages.markup,ue.languages.mathml=ue.languages.markup,ue.languages.svg=ue.languages.markup,ue.languages.xml=ue.languages.extend("markup",{}),ue.languages.ssml=ue.languages.xml,ue.languages.atom=ue.languages.xml,ue.languages.rss=ue.languages.xml,(function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s="(?:[^\\\\-]|"+n.source+")",s=RegExp(s+"-"+s),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ue),ue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ue.languages.javascript=ue.languages.extend("clike",{"class-name":[ue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ue.languages.markup&&(ue.languages.markup.tag.addInlined("script","javascript"),ue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ue.languages.js=ue.languages.javascript,ue.languages.actionscript=ue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ue.languages.actionscript["class-name"].alias="function",delete ue.languages.actionscript.parameter,delete ue.languages.actionscript["literal-property"],ue.languages.markup&&ue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ue.languages.markup}}),(function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(ue),(function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,s){(n=typeof n=="string"?[n]:n).forEach(function(o){var l=function(g){g.inside||(g.inside={}),g.inside.rest=s},c="doc-comment";if(f=e.languages[o]){var f,p=f[c];if((p=p||(f=e.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(p=f[c]={pattern:p}),Array.isArray(p))for(var m=0,h=p.length;m<h;m++)p[m]instanceof RegExp&&(p[m]={pattern:p[m]}),l(p[m]);else l(p)}})}}),t.addSupport(["java","javascript","php"],t)})(ue),(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(ue),(function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})})(ue),(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,p){p=(p||"").replace(/m/g,"")+"m";var m=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return s}).replace(/<<value>>/g,function(){return f});return RegExp(m,p)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return s}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(l),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(ue),(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(m){return m=m.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+l+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+l+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(m){["url","bold","italic","strike","code-snippet"].forEach(function(h){m!==h&&(e.languages.markdown[m].inside.content.inside[h]=e.languages.markdown[h])})}),e.hooks.add("after-tokenize",function(m){m.language!=="markdown"&&m.language!=="md"||(function h(g){if(g&&typeof g!="string")for(var y=0,b=g.length;y<b;y++){var k,w=g[y];w.type!=="code"?h(w.content):(k=w.content[1],w=w.content[3],k&&w&&k.type==="code-language"&&w.type==="code-block"&&typeof k.content=="string"&&(k=k.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),k="language-"+(k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,k]:w.alias.push(k):w.alias=[k]))}})(m.tokens)}),e.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var h="",g=0,y=m.classes.length;g<y;g++){var b=m.classes[g],b=/language-(.+)/.exec(b);if(b){h=b[1];break}}var k,w=e.languages[h];w?m.content=e.highlight((function(S){return S=S.replace(c,""),S=S.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(j,E){var N;return(E=E.toLowerCase())[0]==="#"?(N=E[1]==="x"?parseInt(E.slice(2),16):Number(E.slice(1)),p(N)):f[E]||j})})(m.content),w,h):h&&h!=="none"&&e.plugins.autoloader&&(k="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),m.attributes.id=k,e.plugins.autoloader.loadLanguages(h,function(){var S=document.getElementById(k);S&&(S.innerHTML=e.highlight(S.textContent,e.languages[h],h))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},p=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ue),ue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:ue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},ue.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(k){return typeof k!="string"&&k.type!=="comment"&&k.type!=="scalar"}),n=0;n<t.length;){var s=t[n++];if(s.type==="keyword"&&s.content==="mutation"){var o=[];if(g(["definition-mutation","punctuation"])&&h(1).content==="("){n+=2;var l=y(/^\($/,/^\)$/);if(l===-1)continue;for(;n<l;n++){var c=h(0);c.type==="variable"&&(b(c,"variable-input"),o.push(c.content))}n=l+1}if(g(["punctuation","property-query"])&&h(0).content==="{"&&(n++,b(h(0),"property-mutation"),0<o.length)){var f=y(/^\{$/,/^\}$/);if(f!==-1)for(var p=n;p<f;p++){var m=t[p];m.type==="variable"&&0<=o.indexOf(m.content)&&b(m,"variable-input")}}}}function h(k){return t[n+k]}function g(k,w){w=w||0;for(var S=0;S<k.length;S++){var j=h(S+w);if(!j||j.type!==k[S])return}return 1}function y(k,w){for(var S=1,j=n;j<t.length;j++){var E=t[j],N=E.content;if(E.type==="punctuation"&&typeof N=="string"){if(k.test(N))S++;else if(w.test(N)&&--S===0)return j}}return-1}function b(k,w){var S=k.alias;S?Array.isArray(S)||(k.alias=S=[S]):k.alias=S=[],S.push(w)}}),ue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,s=t.inside.interpolation,o=s.inside["interpolation-punctuation"],l=s.pattern.source;function c(g,y){if(e.languages[g])return{pattern:RegExp("((?:"+y+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:g}}}}function f(g,y,b){return g={code:g,grammar:y,language:b},e.hooks.run("before-tokenize",g),g.tokens=e.tokenize(g.code,g.grammar),e.hooks.run("after-tokenize",g),g.tokens}function p(g,y,b){var S=e.tokenize(g,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),k=0,w={},S=f(S.map(function(E){if(typeof E=="string")return E;for(var N,M,E=E.content;g.indexOf((M=k++,N="___"+b.toUpperCase()+"_"+M+"___"))!==-1;);return w[N]=E,N}).join(""),y,b),j=Object.keys(w);return k=0,(function E(N){for(var M=0;M<N.length;M++){if(k>=j.length)return;var _,R,P,L,G,D,B,W=N[M];typeof W=="string"||typeof W.content=="string"?(_=j[k],(B=(D=typeof W=="string"?W:W.content).indexOf(_))!==-1&&(++k,R=D.substring(0,B),G=w[_],P=void 0,(L={})["interpolation-punctuation"]=o,(L=e.tokenize(G,L)).length===3&&((P=[1,1]).push.apply(P,f(L[1],e.languages.javascript,"javascript")),L.splice.apply(L,P)),P=new e.Token("interpolation",L,s.alias,G),L=D.substring(B+_.length),G=[],R&&G.push(R),G.push(P),L&&(E(D=[L]),G.push.apply(G,D)),typeof W=="string"?(N.splice.apply(N,[M,1].concat(G)),M+=G.length-1):W.content=G)):(B=W.content,Array.isArray(B)?E(B):E([B]))}})(S),new e.Token(b,S,"language-"+b,g)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),t].filter(Boolean);var m={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function h(g){return typeof g=="string"?g:Array.isArray(g)?g.map(h).join(""):h(g.content)}e.hooks.add("after-tokenize",function(g){g.language in m&&(function y(b){for(var k=0,w=b.length;k<w;k++){var S,j,E,N=b[k];typeof N!="string"&&(S=N.content,Array.isArray(S)?N.type==="template-string"?(N=S[1],S.length===3&&typeof N!="string"&&N.type==="embedded-code"&&(j=h(N),N=N.alias,N=Array.isArray(N)?N[0]:N,E=e.languages[N])&&(S[1]=p(j,E,N))):y(S):typeof S!="string"&&y([S]))}})(g.tokens)})})(ue),(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(ue),(function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,s="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(s+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(s+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(ue),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(ue),ue.languages.n4js=ue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),ue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ue.languages.n4jsd=ue.languages.n4js,(function(e){function t(c,f){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],s=0;s<n.length;s++){var l=n[s],o=e.languages.javascript[l],l=(o=e.util.type(o)==="RegExp"?e.languages.javascript[l]={pattern:o}:o).inside||{};(o.inside=l)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ue),(function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,s=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(p,m){return p=p.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return s}).replace(/<SPREAD>/g,function(){return o}),RegExp(p,m)}o=l(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(p){for(var m=[],h=0;h<p.length;h++){var g=p[h],y=!1;typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?0<m.length&&m[m.length-1].tagName===f(g.content[0].content[1])&&m.pop():g.content[g.content.length-1].content!=="/>"&&m.push({tagName:f(g.content[0].content[1]),openedBraces:0}):0<m.length&&g.type==="punctuation"&&g.content==="{"?m[m.length-1].openedBraces++:0<m.length&&0<m[m.length-1].openedBraces&&g.type==="punctuation"&&g.content==="}"?m[m.length-1].openedBraces--:y=!0),(y||typeof g=="string")&&0<m.length&&m[m.length-1].openedBraces===0&&(y=f(g),h<p.length-1&&(typeof p[h+1]=="string"||p[h+1].type==="plain-text")&&(y+=f(p[h+1]),p.splice(h+1,1)),0<h&&(typeof p[h-1]=="string"||p[h-1].type==="plain-text")&&(y=f(p[h-1])+y,p.splice(h-1,1),h--),p[h]=new e.Token("plain-text",y,null,y)),g.content&&typeof g.content!="string"&&c(g.content)}}var f=function(p){return p?typeof p=="string"?p:typeof p.content=="string"?p.content:p.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(p){p.language!=="jsx"&&p.language!=="tsx"||c(p.tokens)})})(ue),(function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0})(ue),ue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},ue.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ue.languages.swift}),(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(ue),ue.languages.c=ue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),ue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},ue.languages.c.string],char:ue.languages.c.char,comment:ue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:ue.languages.c}}}}),ue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete ue.languages.c.boolean,ue.languages.objectivec=ue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete ue.languages.objectivec["class-name"],ue.languages.objc=ue.languages.objectivec,ue.languages.reason=ue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),ue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete ue.languages.reason.function,(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(ue),ue.languages.go=ue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),ue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ue.languages.go["class-name"],(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(ue),ue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ue.languages.python["string-interpolation"].inside.interpolation.inside.rest=ue.languages.python,ue.languages.py=ue.languages.python,ue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ue.languages.webmanifest=ue.languages.json;var q9={};V9(q9,{dracula:()=>K9,duotoneDark:()=>Y9,duotoneLight:()=>J9,github:()=>tA,gruvboxMaterialDark:()=>TA,gruvboxMaterialLight:()=>PA,jettwaveDark:()=>kA,jettwaveLight:()=>CA,nightOwl:()=>rA,nightOwlLight:()=>iA,oceanicNext:()=>aA,okaidia:()=>cA,oneDark:()=>EA,oneLight:()=>AA,palenight:()=>dA,shadesOfPurple:()=>pA,synthwave84:()=>hA,ultramin:()=>xA,vsDark:()=>_v,vsLight:()=>bA});var G9={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},K9=G9,Q9={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},Y9=Q9,X9={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},J9=X9,eA={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},tA=eA,nA={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},rA=nA,sA={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},iA=sA,Fn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},oA={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Fn.keyword}},{types:["attr-value"],style:{color:Fn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Fn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Fn.primitive}},{types:["boolean"],style:{color:Fn.boolean}},{types:["tag"],style:{color:Fn.tag}},{types:["string"],style:{color:Fn.string}},{types:["punctuation"],style:{color:Fn.string}},{types:["selector","char","builtin","inserted"],style:{color:Fn.char}},{types:["function"],style:{color:Fn.function}},{types:["operator","entity","url","variable"],style:{color:Fn.variable}},{types:["keyword"],style:{color:Fn.keyword}},{types:["atrule","class-name"],style:{color:Fn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},aA=oA,lA={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},cA=lA,uA={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},dA=uA,fA={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},pA=fA,mA={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},hA=mA,gA={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},xA=gA,yA={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},_v=yA,vA={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},bA=vA,wA={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},kA=wA,SA={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},CA=SA,jA={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},EA=jA,NA={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},AA=NA,RA={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},TA=RA,IA={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},PA=IA,MA=e=>d.useCallback(t=>{var n=t,{className:s,style:o,line:l}=n,c=Mv(n,["className","style","line"]);const f=nu(Nr({},c),{className:_c("token-line",s)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof o=="object"&&(f.style=Nr(Nr({},f.style||{}),o)),f},[e]),_A=e=>{const t=d.useCallback(({types:n,empty:s})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return s!=null?{display:"inline-block"}:void 0;if(n.length===1&&s!=null)return e[n[0]]}return Object.assign(s!=null?{display:"inline-block"}:{},...n.map(o=>e[o]))}},[e]);return d.useCallback(n=>{var s=n,{token:o,className:l,style:c}=s,f=Mv(s,["token","className","style"]);const p=nu(Nr({},f),{className:_c("token",...o.types,l),children:o.content,style:t(o)});return c!=null&&(p.style=Nr(Nr({},p.style||{}),c)),p},[t])},LA=/\r\n|\r|\n/,P1=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
83
|
+
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
84
|
+
`,e[0].empty=!0)},M1=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},FA=e=>{const t=[[]],n=[e],s=[0],o=[e.length];let l=0,c=0,f=[];const p=[f];for(;c>-1;){for(;(l=s[c]++)<o[c];){let m,h=t[c];const y=n[c][l];if(typeof y=="string"?(h=c>0?h:["plain"],m=y):(h=M1(h,y.type),y.alias&&(h=M1(h,y.alias)),m=y.content),typeof m!="string"){c++,t.push(h),n.push(m),s.push(0),o.push(m.length);continue}const b=m.split(LA),k=b.length;f.push({types:h,content:b[0]});for(let w=1;w<k;w++)P1(f),p.push(f=[]),f.push({types:h,content:b[w]})}c--,t.pop(),n.pop(),s.pop(),o.pop()}return P1(f),p},_1=FA,OA=({prism:e,code:t,grammar:n,language:s})=>d.useMemo(()=>{if(n==null)return _1([t]);const o={code:t,grammar:n,language:s,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",o),_1(o.tokens)},[t,n,s,e]),DA=(e,t)=>{const{plain:n}=e,s=e.styles.reduce((o,l)=>{const{languages:c,style:f}=l;return c&&!c.includes(t)||l.types.forEach(p=>{const m=Nr(Nr({},o[p]),f);o[p]=m}),o},{});return s.root=n,s.plain=nu(Nr({},n),{backgroundColor:void 0}),s},zA=DA,$A=({children:e,language:t,code:n,theme:s,prism:o})=>{const l=t.toLowerCase(),c=zA(s,l),f=MA(c),p=_A(c),m=o.languages[l],h=OA({prism:o,language:l,code:n,grammar:m});return e({tokens:h,className:`prism-code language-${l}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:p})},Lv=e=>d.createElement($A,nu(Nr({},e),{prism:e.prism||ue,theme:e.theme||_v,code:e.code,language:e.language}));const L1="claudia-theme",Fv=d.createContext(void 0);function HA({children:e}){const[t,n]=d.useState(null),[s,o]=d.useState(null),[l,c]=d.useState(!0),[f,p]=d.useState(null),m=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[h,g]=d.useState(()=>{const w=localStorage.getItem(L1),S=w==="light"||w==="dark"||w==="system"?w:"system";return{mode:S==="system"?m():S,colorScheme:S,toggle:()=>{}}});d.useEffect(()=>{(async()=>{try{c(!0);const S=await Ee.getConfig();n(S.interface),o(S.server);const j=S.interface.colorScheme==="system"?m():S.interface.colorScheme;g(E=>({...E,colorScheme:S.interface.colorScheme,mode:j}))}catch(S){p(S instanceof Error?S:new Error("Failed to load preferences"))}finally{c(!1)}})()},[]),d.useEffect(()=>{document.documentElement.setAttribute("data-theme",h.mode),h.mode==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem(L1,h.colorScheme)},[h.mode,h.colorScheme]),d.useEffect(()=>{if(h.colorScheme!=="system")return;const w=window.matchMedia("(prefers-color-scheme: dark)"),S=j=>{g(E=>({...E,mode:j.matches?"dark":"light"}))};return w.addEventListener("change",S),()=>w.removeEventListener("change",S)},[h.colorScheme]);const y=d.useCallback(async w=>{try{const S=await Ee.updateConfig({interface:w});if(n(S.interface),w.colorScheme){const j=w.colorScheme==="system"?m():w.colorScheme;g(E=>({...E,colorScheme:w.colorScheme,mode:j}))}}catch(S){throw p(S instanceof Error?S:new Error("Failed to update preferences")),S}},[]),b=d.useCallback(async()=>{let w;h.colorScheme==="light"?w="dark":h.colorScheme==="dark"?w="system":w="light",await y({colorScheme:w})},[h.colorScheme,y]),k={...h,toggle:b};return a.jsx(Fv.Provider,{value:{preferences:t,serverConfig:s,theme:k,updatePreferences:y,isLoading:l,error:f},children:e})}function Ov(){const e=d.useContext(Fv);if(!e)throw new Error("usePreferencesContext must be used within a PreferencesProvider");return e}function Dv(){const{theme:e}=Ov();return e}var BA=Symbol("radix.slottable");function VA(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=BA,t}var[ru]=Rr("Tooltip",[co]),su=co(),zv="TooltipProvider",UA=700,gp="tooltip.open",[ZA,ym]=ru(zv),$v=e=>{const{__scopeTooltip:t,delayDuration:n=UA,skipDelayDuration:s=300,disableHoverableContent:o=!1,children:l}=e,c=d.useRef(!0),f=d.useRef(!1),p=d.useRef(0);return d.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),a.jsx(ZA,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,s)},[s]),isPointerInTransitRef:f,onPointerInTransitChange:d.useCallback(m=>{f.current=m},[]),disableHoverableContent:o,children:l})};$v.displayName=zv;var ka="Tooltip",[WA,iu]=ru(ka),Hv=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:o,onOpenChange:l,disableHoverableContent:c,delayDuration:f}=e,p=ym(ka,e.__scopeTooltip),m=su(t),[h,g]=d.useState(null),y=en(),b=d.useRef(0),k=c??p.disableHoverableContent,w=f??p.delayDuration,S=d.useRef(!1),[j,E]=es({prop:s,defaultProp:o??!1,onChange:P=>{P?(p.onOpen(),document.dispatchEvent(new CustomEvent(gp))):p.onClose(),l?.(P)},caller:ka}),N=d.useMemo(()=>j?S.current?"delayed-open":"instant-open":"closed",[j]),M=d.useCallback(()=>{window.clearTimeout(b.current),b.current=0,S.current=!1,E(!0)},[E]),_=d.useCallback(()=>{window.clearTimeout(b.current),b.current=0,E(!1)},[E]),R=d.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{S.current=!0,E(!0),b.current=0},w)},[w,E]);return d.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),a.jsx(Wp,{...m,children:a.jsx(WA,{scope:t,contentId:y,open:j,stateAttribute:N,trigger:h,onTriggerChange:g,onTriggerEnter:d.useCallback(()=>{p.isOpenDelayedRef.current?R():M()},[p.isOpenDelayedRef,R,M]),onTriggerLeave:d.useCallback(()=>{k?_():(window.clearTimeout(b.current),b.current=0)},[_,k]),onOpen:M,onClose:_,disableHoverableContent:k,children:n})})};Hv.displayName=ka;var xp="TooltipTrigger",Bv=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,o=iu(xp,n),l=ym(xp,n),c=su(n),f=d.useRef(null),p=mt(t,f,o.onTriggerChange),m=d.useRef(!1),h=d.useRef(!1),g=d.useCallback(()=>m.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),a.jsx($c,{asChild:!0,...c,children:a.jsx(He.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...s,ref:p,onPointerMove:Ve(e.onPointerMove,y=>{y.pointerType!=="touch"&&!h.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:Ve(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:Ve(e.onPointerDown,()=>{o.open&&o.onClose(),m.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Ve(e.onFocus,()=>{m.current||o.onOpen()}),onBlur:Ve(e.onBlur,o.onClose),onClick:Ve(e.onClick,o.onClose)})})});Bv.displayName=xp;var qA="TooltipPortal",[vO,GA]=ru(qA,{forceMount:void 0}),no="TooltipContent",Vv=d.forwardRef((e,t)=>{const n=GA(no,e.__scopeTooltip),{forceMount:s=n.forceMount,side:o="top",...l}=e,c=iu(no,e.__scopeTooltip);return a.jsx(Ir,{present:s||c.open,children:c.disableHoverableContent?a.jsx(Uv,{side:o,...l,ref:t}):a.jsx(KA,{side:o,...l,ref:t})})}),KA=d.forwardRef((e,t)=>{const n=iu(no,e.__scopeTooltip),s=ym(no,e.__scopeTooltip),o=d.useRef(null),l=mt(t,o),[c,f]=d.useState(null),{trigger:p,onClose:m}=n,h=o.current,{onPointerInTransitChange:g}=s,y=d.useCallback(()=>{f(null),g(!1)},[g]),b=d.useCallback((k,w)=>{const S=k.currentTarget,j={x:k.clientX,y:k.clientY},E=e7(j,S.getBoundingClientRect()),N=t7(j,E),M=n7(w.getBoundingClientRect()),_=s7([...N,...M]);f(_),g(!0)},[g]);return d.useEffect(()=>()=>y(),[y]),d.useEffect(()=>{if(p&&h){const k=S=>b(S,h),w=S=>b(S,p);return p.addEventListener("pointerleave",k),h.addEventListener("pointerleave",w),()=>{p.removeEventListener("pointerleave",k),h.removeEventListener("pointerleave",w)}}},[p,h,b,y]),d.useEffect(()=>{if(c){const k=w=>{const S=w.target,j={x:w.clientX,y:w.clientY},E=p?.contains(S)||h?.contains(S),N=!r7(j,c);E?y():N&&(y(),m())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[p,h,c,m,y]),a.jsx(Uv,{...e,ref:l})}),[QA,YA]=ru(ka,{isInside:!1}),XA=VA("TooltipContent"),Uv=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:c,...f}=e,p=iu(no,n),m=su(n),{onClose:h}=p;return d.useEffect(()=>(document.addEventListener(gp,h),()=>document.removeEventListener(gp,h)),[h]),d.useEffect(()=>{if(p.trigger){const g=y=>{y.target?.contains(p.trigger)&&h()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[p.trigger,h]),a.jsx(Na,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:h,children:a.jsxs(qp,{"data-state":p.stateAttribute,...m,...f,ref:t,style:{...f.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:[a.jsx(XA,{children:s}),a.jsx(QA,{scope:n,isInside:!0,children:a.jsx(U5,{id:p.contentId,role:"tooltip",children:o||s})})]})})});Vv.displayName=no;var Zv="TooltipArrow",JA=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,o=su(n);return YA(Zv,n).isInside?null:a.jsx(Gp,{...o,...s,ref:t})});JA.displayName=Zv;function e7(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,s,o,l)){case l:return"left";case o:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function t7(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function n7(e){const{top:t,right:n,bottom:s,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:s},{x:o,y:s}]}function r7(e,t){const{x:n,y:s}=e;let o=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const f=t[l],p=t[c],m=f.x,h=f.y,g=p.x,y=p.y;h>s!=y>s&&n<(g-m)*(s-h)/(y-h)+m&&(o=!o)}return o}function s7(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),i7(t)}function i7(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const o=e[s];for(;t.length>=2;){const l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(o.y-c.y)>=(l.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const o=e[s];for(;n.length>=2;){const l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(o.y-c.y)>=(l.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var o7=$v,a7=Hv,l7=Bv,Wv=Vv;const mr=o7,En=a7,Nn=l7,pn=d.forwardRef(({className:e,sideOffset:t=4,...n},s)=>a.jsx(Wv,{ref:s,sideOffset:t,className:Ne("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",e),...n}));pn.displayName=Wv.displayName;const c7={javascript:"javascript",typescript:"typescript",jsx:"jsx",tsx:"tsx",python:"python",java:"java",csharp:"csharp",cpp:"cpp",c:"c",go:"go",rust:"rust",php:"php",ruby:"ruby",swift:"swift",kotlin:"kotlin",scala:"scala",r:"r",matlab:"matlab",sql:"sql",bash:"bash",powershell:"powershell",dockerfile:"dockerfile",makefile:"makefile",yaml:"yaml",json:"json",xml:"xml",html:"markup",css:"css",scss:"scss",sass:"sass",less:"less",markdown:"markdown",latex:"latex",vim:"vim",lua:"lua",perl:"perl",objectivec:"objectivec",fsharp:"fsharp",ocaml:"ocaml",haskell:"haskell",elixir:"elixir",erlang:"erlang",clojure:"clojure",lisp:"lisp",scheme:"scheme",fortran:"fortran",pascal:"pascal",dart:"dart",groovy:"groovy",solidity:"solidity",graphql:"graphql",wasm:"wasm",vhdl:"vhdl",verilog:"verilog",asm:"asm6502",diff:"diff",ini:"ini",toml:"toml",gitignore:"gitignore",text:"text"},u7={plain:{color:"#ffffff",backgroundColor:"#292a30"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#6c7986",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ffffff"}},{types:["property","tag","boolean","number","constant","symbol"],style:{color:"#d0a8ff"}},{types:["deleted","selector","attr-name","string","char","builtin"],style:{color:"#fc6a5d"}},{types:["inserted"],style:{color:"#67b7a4"}},{types:["operator","entity","url"],style:{color:"#ffffff"}},{types:["atrule","attr-value","keyword"],style:{color:"#fc5fa3",fontWeight:"bold"}},{types:["function","class-name"],style:{color:"#67b7a4"}},{types:["regex","important","variable"],style:{color:"#a167e6"}}]},d7={plain:{color:"#262626",backgroundColor:"#ffffff"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#5d6c79",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#262626"}},{types:["property","tag","boolean","number","constant","symbol"],style:{color:"#aa0d91"}},{types:["deleted","selector","attr-name","string","char","builtin"],style:{color:"#c41a16"}},{types:["inserted"],style:{color:"#1c00cf"}},{types:["operator","entity","url"],style:{color:"#262626"}},{types:["atrule","attr-value","keyword"],style:{color:"#aa0d91",fontWeight:"bold"}},{types:["function","class-name"],style:{color:"#1c00cf"}},{types:["regex","important","variable"],style:{color:"#5c2699"}}]},ou=({code:e,language:t,showLineNumbers:n=!1,className:s=""})=>{const l=Dv().mode==="dark"?u7:d7,[c,f]=d.useState(!1),p=c7[t.toLowerCase()]||"text";return a.jsx(Lv,{theme:l,code:e.trimEnd(),language:p,children:({className:m,style:h,tokens:g,getLineProps:y,getTokenProps:b})=>{const k=g.length,w=k>8,S=c?g:g.slice(0,8),j=k-8;return a.jsxs("div",{className:"relative",children:[w&&a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{variant:"ghost",size:"icon",onClick:()=>f(!c),className:"absolute top-2 right-2 h-6 w-6 z-10 text-muted-foreground hover:text-foreground","aria-label":c?"Show fewer lines":"Show all lines",children:c?a.jsx(Kc,{size:16}):a.jsx(Gc,{size:16})})}),a.jsx(pn,{children:c?"Show fewer lines":"Show all lines"})]})}),a.jsx("pre",{className:Ne("bg-card text-card-foreground p-3 rounded-md overflow-hidden whitespace-pre-wrap break-words font-mono text-[13px] leading-[1.8] m-0 border border-border",m,s),style:{...h,margin:0},children:a.jsxs("code",{className:"block font-mono text-[13px] leading-[1.8] whitespace-pre-wrap break-words",children:[S.map((E,N)=>{const{key:M,..._}=y({line:E,key:N});return a.jsxs("div",{..._,className:"table-row",children:[n&&a.jsx("span",{className:"table-cell text-right pr-4 select-none text-neutral-500 dark:text-neutral-400 min-w-[2.5rem] bg-transparent",children:N+1}),a.jsx("span",{className:"table-cell w-full whitespace-pre-wrap break-words",children:E.map((R,P)=>{const{key:L,...G}=b({token:R,key:P});return a.jsx("span",{...G},P)})})]},N)}),!c&&w&&a.jsxs("div",{className:"table-row",children:[n&&a.jsx("span",{className:"table-cell text-right pr-4 select-none text-neutral-500 dark:text-neutral-400 min-w-[2.5rem] bg-transparent"}),a.jsxs("span",{className:"table-cell w-full whitespace-pre-wrap break-words text-neutral-500 dark:text-neutral-400 italic",children:["... +",j," lines"]})]})]})})]})}})};var au="Collapsible",[f7]=Rr(au),[p7,vm]=f7(au),qv=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:l,onOpenChange:c,...f}=e,[p,m]=es({prop:s,defaultProp:o??!1,onChange:c,caller:au});return a.jsx(p7,{scope:n,disabled:l,contentId:en(),open:p,onOpenToggle:d.useCallback(()=>m(h=>!h),[m]),children:a.jsx(He.div,{"data-state":wm(p),"data-disabled":l?"":void 0,...f,ref:t})})});qv.displayName=au;var Gv="CollapsibleTrigger",Kv=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...s}=e,o=vm(Gv,n);return a.jsx(He.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":wm(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:t,onClick:Ve(e.onClick,o.onOpenToggle)})});Kv.displayName=Gv;var bm="CollapsibleContent",Qv=d.forwardRef((e,t)=>{const{forceMount:n,...s}=e,o=vm(bm,e.__scopeCollapsible);return a.jsx(Ir,{present:n||o.open,children:({present:l})=>a.jsx(m7,{...s,ref:t,present:l})})});Qv.displayName=bm;var m7=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:s,children:o,...l}=e,c=vm(bm,n),[f,p]=d.useState(s),m=d.useRef(null),h=mt(t,m),g=d.useRef(0),y=g.current,b=d.useRef(0),k=b.current,w=c.open||f,S=d.useRef(w),j=d.useRef(void 0);return d.useEffect(()=>{const E=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(E)},[]),tn(()=>{const E=m.current;if(E){j.current=j.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const N=E.getBoundingClientRect();g.current=N.height,b.current=N.width,S.current||(E.style.transitionDuration=j.current.transitionDuration,E.style.animationName=j.current.animationName),p(s)}},[c.open,s]),a.jsx(He.div,{"data-state":wm(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!w,...l,ref:h,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":k?`${k}px`:void 0,...e.style},children:w&&o})});function wm(e){return e?"open":"closed"}var h7=qv;function Pr({...e}){return a.jsx(h7,{"data-slot":"collapsible",...e})}function Mr({...e}){return a.jsx(Kv,{"data-slot":"collapsible-trigger",...e})}function _r({...e}){return a.jsx(Qv,{"data-slot":"collapsible-content",...e})}function g7(e){let t=e.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g,"");return t=t.replace(/^\s*\d+→/gm,""),t.trimEnd()}function x7({input:e,result:t,workingDirectory:n}){if(!t)return a.jsx("div",{});const[s,o]=d.useState(!1),l=g7(t),c=kc(l),f=e?.file_path||"",p=Qi(f,n),m=gm(f);let h="";return e?.offset!==void 0&&e?.limit!==void 0?h=` · lines ${e.offset}-${e.offset+e.limit}`:e?.offset!==void 0?h=` · from line ${e.offset}`:e?.limit!==void 0&&(h=` · first ${e.limit} lines`),a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:s,onOpenChange:o,children:a.jsxs("div",{className:"border border-sky-500/30 rounded-lg overflow-hidden bg-sky-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-sky-500/10 transition-colors",children:[s?a.jsx(cn,{size:16,className:"text-sky-400 flex-shrink-0"}):a.jsx(An,{size:16,className:"text-sky-400 flex-shrink-0"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(eo,{size:16,className:"text-sky-400 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-sky-400",children:"Read"})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1",children:p}),a.jsxs("span",{className:"text-xs text-muted-foreground flex-shrink-0 tabular-nums",children:[c," lines",h]})]})}),a.jsx(_r,{children:l&&a.jsx("div",{className:"border-t border-sky-500/20",children:a.jsx(ou,{code:l,language:m,showLineNumbers:!0,className:"bg-neutral-950 rounded-none"})})})]})})})}class y7{diff(t,n,s={}){let o;typeof s=="function"?(o=s,s={}):"callback"in s&&(o=s.callback);const l=this.castInput(t,s),c=this.castInput(n,s),f=this.removeEmpty(this.tokenize(l,s)),p=this.removeEmpty(this.tokenize(c,s));return this.diffWithOptionsObj(f,p,s,o)}diffWithOptionsObj(t,n,s,o){var l;const c=E=>{if(E=this.postProcess(E,s),o){setTimeout(function(){o(E)},0);return}else return E},f=n.length,p=t.length;let m=1,h=f+p;s.maxEditLength!=null&&(h=Math.min(h,s.maxEditLength));const g=(l=s.timeout)!==null&&l!==void 0?l:1/0,y=Date.now()+g,b=[{oldPos:-1,lastComponent:void 0}];let k=this.extractCommon(b[0],n,t,0,s);if(b[0].oldPos+1>=p&&k+1>=f)return c(this.buildValues(b[0].lastComponent,n,t));let w=-1/0,S=1/0;const j=()=>{for(let E=Math.max(w,-m);E<=Math.min(S,m);E+=2){let N;const M=b[E-1],_=b[E+1];M&&(b[E-1]=void 0);let R=!1;if(_){const L=_.oldPos-E;R=_&&0<=L&&L<f}const P=M&&M.oldPos+1<p;if(!R&&!P){b[E]=void 0;continue}if(!P||R&&M.oldPos<_.oldPos?N=this.addToPath(_,!0,!1,0,s):N=this.addToPath(M,!1,!0,1,s),k=this.extractCommon(N,n,t,E,s),N.oldPos+1>=p&&k+1>=f)return c(this.buildValues(N.lastComponent,n,t))||!0;b[E]=N,N.oldPos+1>=p&&(S=Math.min(S,E-1)),k+1>=f&&(w=Math.max(w,E+1))}m++};if(o)(function E(){setTimeout(function(){if(m>h||Date.now()>y)return o(void 0);j()||E()},0)})();else for(;m<=h&&Date.now()<=y;){const E=j();if(E)return E}}addToPath(t,n,s,o,l){const c=t.lastComponent;return c&&!l.oneChangePerToken&&c.added===n&&c.removed===s?{oldPos:t.oldPos+o,lastComponent:{count:c.count+1,added:n,removed:s,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:s,previousComponent:c}}}extractCommon(t,n,s,o,l){const c=n.length,f=s.length;let p=t.oldPos,m=p-o,h=0;for(;m+1<c&&p+1<f&&this.equals(s[p+1],n[m+1],l);)m++,p++,h++,l.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return h&&!l.oneChangePerToken&&(t.lastComponent={count:h,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=p,m}equals(t,n,s){return s.comparator?s.comparator(t,n):t===n||!!s.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let s=0;s<t.length;s++)t[s]&&n.push(t[s]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,s){const o=[];let l;for(;t;)o.push(t),l=t.previousComponent,delete t.previousComponent,t=l;o.reverse();const c=o.length;let f=0,p=0,m=0;for(;f<c;f++){const h=o[f];if(h.removed)h.value=this.join(s.slice(m,m+h.count)),m+=h.count;else{if(!h.added&&this.useLongestToken){let g=n.slice(p,p+h.count);g=g.map(function(y,b){const k=s[m+b];return k.length>y.length?k:y}),h.value=this.join(g)}else h.value=this.join(n.slice(p,p+h.count));p+=h.count,h.added||(m+=h.count)}}return o}}class v7 extends y7{constructor(){super(...arguments),this.tokenize=k7}equals(t,n,s){return s.ignoreWhitespace?((!s.newlineIsToken||!t.includes(`
|
|
85
|
+
`))&&(t=t.trim()),(!s.newlineIsToken||!n.includes(`
|
|
86
|
+
`))&&(n=n.trim())):s.ignoreNewlineAtEof&&!s.newlineIsToken&&(t.endsWith(`
|
|
87
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
88
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,s)}}const b7=new v7;function w7(e,t,n){return b7.diff(e,t,n)}function k7(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
89
|
+
`));const n=[],s=e.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(let o=0;o<s.length;o++){const l=s[o];o%2&&!t.newlineIsToken?n[n.length-1]+=l:n.push(l)}return n}const S7={javascript:"javascript",typescript:"typescript",jsx:"jsx",tsx:"tsx",python:"python",java:"java",go:"go",rust:"rust",ruby:"ruby",php:"php",bash:"bash",json:"json",yaml:"yaml",css:"css",html:"markup",xml:"markup",markdown:"markdown",sql:"sql",c:"c",cpp:"cpp",csharp:"csharp",swift:"swift",kotlin:"kotlin",dockerfile:"dockerfile",makefile:"makefile"},C7={plain:{color:"#e5e5e5",backgroundColor:"transparent"},styles:[{types:["comment"],style:{color:"#6c7986",fontStyle:"italic"}},{types:["string","char"],style:{color:"#fc6a5d"}},{types:["number","boolean","constant"],style:{color:"#d0a8ff"}},{types:["keyword"],style:{color:"#fc5fa3",fontWeight:"bold"}},{types:["function","class-name"],style:{color:"#67b7a4"}},{types:["operator","punctuation"],style:{color:"#e5e5e5"}},{types:["property","tag"],style:{color:"#d0a8ff"}}]},j7={plain:{color:"#262626",backgroundColor:"transparent"},styles:[{types:["comment"],style:{color:"#5d6c79",fontStyle:"italic"}},{types:["string","char"],style:{color:"#c41a16"}},{types:["number","boolean","constant"],style:{color:"#aa0d91"}},{types:["keyword"],style:{color:"#aa0d91",fontWeight:"bold"}},{types:["function","class-name"],style:{color:"#1c00cf"}},{types:["operator","punctuation"],style:{color:"#262626"}},{types:["property","tag"],style:{color:"#aa0d91"}}]};function E7(e,t){const n=w7(e,t),s=[];for(const o of n){const l=o.value.split(`
|
|
90
|
+
`);l[l.length-1]===""&&l.pop();for(const c of l)o.added?s.push({type:"added",content:c}):o.removed?s.push({type:"removed",content:c}):s.push({type:"unchanged",content:c})}return s}function F1({oldValue:e,newValue:t,language:n="text"}){const o=Dv().mode==="dark",[l,c]=d.useState(!1),f=e??"",p=t??"",m=d.useMemo(()=>E7(f,p),[f,p]),h=m.length,g=h>12,y=l?m:m.slice(0,12),b=h-12,k=S7[n.toLowerCase()]||"text",w=o?C7:j7;return f===p?a.jsx("div",{className:"p-3 font-mono text-xs text-muted-foreground bg-neutral-950",children:"No changes"}):a.jsxs("div",{className:"relative overflow-hidden bg-neutral-950",children:[g&&a.jsx(Oe,{variant:"ghost",size:"sm",onClick:()=>c(!l),className:"absolute top-2 right-2 h-6 w-6 p-0 z-10 text-muted-foreground hover:text-foreground","aria-label":l?"Show fewer lines":"Show all lines",children:l?a.jsx(Kc,{size:16}):a.jsx(Gc,{size:16})}),a.jsx("div",{className:"font-mono text-[13px] leading-[1.6] overflow-x-auto",children:y.map((S,j)=>{const E=S.type==="added"?"bg-emerald-500/15":S.type==="removed"?"bg-red-500/15":"",N=S.type==="added"?"text-emerald-400":S.type==="removed"?"text-red-400":"text-muted-foreground/50",M=S.type==="added"?"+":S.type==="removed"?"-":" ";return a.jsxs("div",{className:`flex ${E}`,children:[a.jsx("span",{className:`select-none w-6 text-center shrink-0 ${N}`,children:M}),a.jsx(Lv,{theme:w,code:S.content,language:k,children:({tokens:_,getTokenProps:R})=>a.jsx("span",{className:"flex-1 whitespace-pre-wrap break-all px-2",children:_[0]?.map((P,L)=>{const{key:G,...D}=R({token:P,key:L});return a.jsx("span",{...D},L)})})})]},j)})}),!l&&g&&a.jsxs("div",{className:"text-center text-xs text-muted-foreground py-2 border-t border-emerald-500/20 bg-neutral-950/50",children:["+",b," more lines"]})]})}function O1(e,t){const n=e.split(`
|
|
91
|
+
`).length,s=t.split(`
|
|
92
|
+
`).length;return{added:Math.max(0,s-n),removed:Math.max(0,n-s)}}function N7({input:e,result:t,isMultiEdit:n=!1,workingDirectory:s}){const[o,l]=d.useState(!0),c=e?.file_path||"",f=Qi(c,s),p=gm(c);let m=0,h=0,g=1;if(n&&e.edits&&Array.isArray(e.edits))g=e.edits.length,e.edits.forEach(w=>{const S=O1(w.old_string||"",w.new_string||"");m+=S.added,h+=S.removed});else if(e.old_string!==void 0&&e.new_string!==void 0){const w=O1(e.old_string,e.new_string);m=w.added,h=w.removed}const y=[];g>1&&y.push(`${g} edits`),m>0&&y.push(`+${m}`),h>0&&y.push(`-${h}`);const b=y.join(" · ")||"updated",k=()=>n&&e.edits&&Array.isArray(e.edits)?a.jsx("div",{className:"flex flex-col",children:e.edits.map((w,S)=>a.jsxs("div",{children:[S>0&&a.jsx("div",{className:"border-t border-emerald-500/20"}),a.jsx(F1,{oldValue:w.old_string||"",newValue:w.new_string||"",language:p})]},S))}):e.old_string!==void 0&&e.new_string!==void 0?a.jsx(F1,{oldValue:e.old_string,newValue:e.new_string,language:p}):t?a.jsx(ou,{code:t,language:p,className:"bg-neutral-950 rounded-none"}):a.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Edit completed successfully"});return a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:o,onOpenChange:l,children:a.jsxs("div",{className:"border border-emerald-500/30 rounded-lg overflow-hidden bg-emerald-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-emerald-500/10 transition-colors",children:[o?a.jsx(cn,{size:16,className:"text-emerald-400 flex-shrink-0"}):a.jsx(An,{size:16,className:"text-emerald-400 flex-shrink-0"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(S2,{size:16,className:"text-emerald-400 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-400",children:"Edit"})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1",children:f}),a.jsx("span",{className:"text-xs text-muted-foreground flex-shrink-0 tabular-nums",children:b})]})}),a.jsx(_r,{children:a.jsx("div",{className:"border-t border-emerald-500/20",children:k()})})]})})})}function A7({input:e,result:t,workingDirectory:n}){const[s,o]=d.useState(!0),l=e?.file_path||"",c=e?.content||"",f=Qi(l,n),p=gm(l),m=kc(c);return a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:s,onOpenChange:o,children:a.jsxs("div",{className:"border border-violet-500/30 rounded-lg overflow-hidden bg-violet-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-violet-500/10 transition-colors",children:[s?a.jsx(cn,{size:16,className:"text-violet-400 flex-shrink-0"}):a.jsx(An,{size:16,className:"text-violet-400 flex-shrink-0"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(nj,{size:16,className:"text-violet-400 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-violet-400",children:"Write"})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1",children:f}),a.jsxs("span",{className:"text-xs text-muted-foreground flex-shrink-0 tabular-nums",children:[m," lines"]})]})}),a.jsx(_r,{children:c&&a.jsx("div",{className:"border-t border-violet-500/20",children:a.jsx(ou,{code:c,language:p,showLineNumbers:!0,className:"bg-neutral-950 rounded-none"})})})]})})})}function R7(e){return e?e.split(`
|
|
93
|
+
`).filter(t=>t.trim()).length:0}function T7({input:e,result:t}){const[n,s]=d.useState(!1),o=e?.command||"";e?.description;const l=R7(t),c=o.length>60?o.slice(0,60)+"...":o;return a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:n,onOpenChange:s,children:a.jsxs("div",{className:"border border-orange-500/30 rounded-lg overflow-hidden bg-orange-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-orange-500/10 transition-colors",children:[n?a.jsx(cn,{size:16,className:"text-orange-400"}):a.jsx(An,{size:16,className:"text-orange-400"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qc,{size:16,className:"text-orange-400"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-orange-400",children:"Bash"})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1 font-mono",children:c}),a.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[l," lines"]})]})}),a.jsx(_r,{children:t&&a.jsx("div",{className:"border-t border-orange-500/20",children:a.jsx("pre",{className:"m-0 px-3 py-3 text-neutral-100 font-mono text-xs leading-relaxed whitespace-pre-wrap break-words bg-neutral-950",children:t})})})]})})})}function I7({input:e,result:t,toolType:n}){const[s,o]=d.useState(!1),c=(()=>{switch(n){case"Grep":const p=kc(t);return{icon:ii,label:"GREP",pattern:e?.pattern||"",summary:`${p} match${p!==1?"es":""}`};case"Glob":const m=kc(t);return{icon:ij,label:"GLOB",pattern:e?.pattern||"",summary:`${m} file${m!==1?"s":""}`};case"LS":const h=_9(t);return{icon:qc,label:"LS",pattern:e?.path||".",summary:`${h} item${h!==1?"s":""}`};default:return{icon:ii,label:"SEARCH",pattern:"",summary:"complete"}}})(),f=c.icon;return a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:s,onOpenChange:o,children:a.jsxs("div",{className:"border border-cyan-500/30 rounded-lg overflow-hidden bg-cyan-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-cyan-500/10 transition-colors",children:[s?a.jsx(cn,{size:16,className:"text-cyan-400"}):a.jsx(An,{size:16,className:"text-cyan-400"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(f,{size:16,className:"text-cyan-400"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-400",children:c.label})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1 font-mono",children:c.pattern}),a.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:c.summary})]})}),a.jsx(_r,{children:t&&a.jsx("div",{className:"border-t border-cyan-500/20",children:a.jsx("pre",{className:"m-0 px-3 py-3 text-neutral-100 font-mono text-xs leading-relaxed whitespace-pre-wrap break-words bg-neutral-950",children:t})})})]})})})}function P7(e){switch(e){case"completed":return a.jsx(ha,{size:14,className:"text-green-500 flex-shrink-0"});case"in_progress":return a.jsx(VC,{size:14,className:"text-blue-500 flex-shrink-0"});default:return a.jsx(As,{size:14,className:"text-muted-foreground flex-shrink-0"})}}function M7({input:e,result:t,isWrite:n}){const[s,o]=d.useState(!0);let l=[];n&&e.todos&&Array.isArray(e.todos)?l=e.todos:!n&&t&&(l=L9(t));const c=l.filter(g=>g.status==="completed").length,f=l.filter(g=>g.status==="in_progress").length,p=l.filter(g=>g.status==="pending").length,m=[];c>0&&m.push(`${c} done`),f>0&&m.push(`${f} active`),p>0&&m.push(`${p} pending`);const h=m.length>0?m.join(", "):"No items";return l.length===0?a.jsx("div",{className:"my-1",children:a.jsx("div",{className:"border border-indigo-500/30 rounded-lg overflow-hidden bg-indigo-500/5",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[a.jsx(a1,{size:16,className:"text-indigo-400"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-400",children:n?"Todos":"Todo List"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"No items"})]})})}):a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:s,onOpenChange:o,children:a.jsxs("div",{className:"border border-indigo-500/30 rounded-lg overflow-hidden bg-indigo-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-indigo-500/10 transition-colors",children:[s?a.jsx(cn,{size:16,className:"text-indigo-400"}):a.jsx(An,{size:16,className:"text-indigo-400"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(a1,{size:16,className:"text-indigo-400"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-400",children:n?"Todos":"Todo List"})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1",children:h}),a.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[l.length," items"]})]})}),a.jsx(_r,{children:a.jsx("div",{className:"border-t border-indigo-500/20 px-3 py-3 space-y-2",children:l.map((g,y)=>a.jsxs("div",{className:"flex items-start gap-2 text-sm leading-relaxed",children:[a.jsx("div",{className:"mt-0.5 flex items-center",children:P7(g.status)}),a.jsx("span",{className:`text-foreground/90 ${g.status==="completed"?"line-through text-muted-foreground":""}`,children:g.content})]},g.id||`todo-${y}`))})})]})})})}function _7({input:e,result:t,toolType:n}){const[s,o]=d.useState(!1),l=n==="WebSearch",c=l?Jp:ga,f=()=>{if(l){const m=e?.query;return m?`"${m.slice(0,50)}${m.length>50?"...":""}"`:"Web search"}else return(e?.url?kf(e.url):"")||"Fetched URL"},p=()=>t?t.split(`
|
|
94
|
+
`).filter(m=>m.trim()).length:0;return a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:s,onOpenChange:o,children:a.jsxs("div",{className:"border border-teal-500/30 rounded-lg overflow-hidden bg-teal-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-teal-500/10 transition-colors",children:[s?a.jsx(cn,{size:16,className:"text-teal-400"}):a.jsx(An,{size:16,className:"text-teal-400"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(c,{size:16,className:"text-teal-400"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-teal-400",children:l?"Search":"Fetch"})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1",children:f()}),t&&a.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[p()," lines"]})]})}),a.jsxs(_r,{children:[!l&&e?.url&&a.jsx("div",{className:"border-t border-teal-500/20 px-3 py-2",children:a.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-1 bg-secondary rounded-full text-xs text-muted-foreground no-underline transition-all hover:bg-muted hover:text-foreground",children:[a.jsx("img",{src:`https://www.google.com/s2/favicons?domain=${kf(e.url)}&sz=32`,alt:"",width:12,height:12,className:"w-3 h-3 rounded-sm"}),a.jsx("span",{children:kf(e.url)}),a.jsx(ga,{size:10,className:"opacity-50"})]})}),t&&a.jsx("div",{className:"border-t border-teal-500/20",children:a.jsx("pre",{className:"m-0 px-3 py-3 text-neutral-100 font-mono text-xs leading-relaxed whitespace-pre-wrap break-words bg-neutral-950",children:t})})]})]})})})}function L7(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const F7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,D7={};function D1(e,t){return(D7.jsx?O7:F7).test(e)}const z7=/[ \t\n\f\r]/g;function $7(e){return typeof e=="object"?e.type==="text"?z1(e.value):!1:z1(e)}function z1(e){return e.replace(z7,"")===""}class Pa{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Pa.prototype.normal={};Pa.prototype.property={};Pa.prototype.space=void 0;function Yv(e,t){const n={},s={};for(const o of e)Object.assign(n,o.property),Object.assign(s,o.normal);return new Pa(n,s,t)}function yp(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let H7=0;const Ge=di(),Dt=di(),vp=di(),ye=di(),kt=di(),Yi=di(),On=di();function di(){return 2**++H7}const bp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Dt,commaOrSpaceSeparated:On,commaSeparated:Yi,number:ye,overloadedBoolean:vp,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),Sf=Object.keys(bp);class km extends Rn{constructor(t,n,s,o){let l=-1;if(super(t,n),$1(this,"space",o),typeof s=="number")for(;++l<Sf.length;){const c=Sf[l];$1(this,Sf[l],(s&bp[c])===bp[c])}}}km.prototype.defined=!0;function $1(e,t,n){n&&(e[t]=n)}function fo(e){const t={},n={};for(const[s,o]of Object.entries(e.properties)){const l=new km(s,e.transform(e.attributes||{},s),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(l.mustUseProperty=!0),t[s]=l,n[yp(s)]=s,n[yp(l.attribute)]=s}return new Pa(t,n,e.space)}const Xv=fo({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:kt,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:ye,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:kt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Dt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Jv(e,t){return t in e?e[t]:t}function eb(e,t){return Jv(e,t.toLowerCase())}const B7=fo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yi,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:kt,autoFocus:Ge,autoPlay:Ge,blocking:kt,capture:null,charSet:null,checked:Ge,cite:null,className:kt,cols:ye,colSpan:null,content:null,contentEditable:Dt,controls:Ge,controlsList:kt,coords:ye|Yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:vp,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:kt,height:ye,hidden:vp,high:ye,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:kt,itemRef:kt,itemScope:Ge,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:ye,pattern:null,ping:kt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:kt,required:Ge,reversed:Ge,rows:ye,rowSpan:ye,sandbox:kt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Dt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:eb}),V7=fo({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:On,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:kt,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:Yi,g2:Yi,glyphName:Yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:On,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,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:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:On,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:On,rev:On,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:On,requiredFeatures:On,requiredFonts:On,requiredFormats:On,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:On,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:On,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:On,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Jv}),tb=fo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),nb=fo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eb}),rb=fo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),U7={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"},Z7=/[A-Z]/g,H1=/-[a-z]/g,W7=/^data[-\w.:]+$/i;function q7(e,t){const n=yp(t);let s=t,o=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&W7.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(H1,K7);s="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!H1.test(l)){let c=l.replace(Z7,G7);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=km}return new o(s,t)}function G7(e){return"-"+e.toLowerCase()}function K7(e){return e.charAt(1).toUpperCase()}const Q7=Yv([Xv,B7,tb,nb,rb],"html"),Sm=Yv([Xv,V7,tb,nb,rb],"svg");function Y7(e){return e.join(" ").trim()}var Vi={},Cf,B1;function X7(){if(B1)return Cf;B1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
|
|
95
|
+
`,m="/",h="*",g="",y="comment",b="declaration";function k(S,j){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];j=j||{};var E=1,N=1;function M(Q){var F=Q.match(t);F&&(E+=F.length);var Z=Q.lastIndexOf(p);N=~Z?Q.length-Z:N+Q.length}function _(){var Q={line:E,column:N};return function(F){return F.position=new R(Q),G(),F}}function R(Q){this.start=Q,this.end={line:E,column:N},this.source=j.source}R.prototype.content=S;function P(Q){var F=new Error(j.source+":"+E+":"+N+": "+Q);if(F.reason=Q,F.filename=j.source,F.line=E,F.column=N,F.source=S,!j.silent)throw F}function L(Q){var F=Q.exec(S);if(F){var Z=F[0];return M(Z),S=S.slice(Z.length),F}}function G(){L(n)}function D(Q){var F;for(Q=Q||[];F=B();)F!==!1&&Q.push(F);return Q}function B(){var Q=_();if(!(m!=S.charAt(0)||h!=S.charAt(1))){for(var F=2;g!=S.charAt(F)&&(h!=S.charAt(F)||m!=S.charAt(F+1));)++F;if(F+=2,g===S.charAt(F-1))return P("End of comment missing");var Z=S.slice(2,F-2);return N+=2,M(Z),S=S.slice(F),N+=2,Q({type:y,comment:Z})}}function W(){var Q=_(),F=L(s);if(F){if(B(),!L(o))return P("property missing ':'");var Z=L(l),K=Q({type:b,property:w(F[0].replace(e,g)),value:Z?w(Z[0].replace(e,g)):g});return L(c),K}}function Y(){var Q=[];D(Q);for(var F;F=W();)F!==!1&&(Q.push(F),D(Q));return Q}return G(),Y()}function w(S){return S?S.replace(f,g):g}return Cf=k,Cf}var V1;function J7(){if(V1)return Vi;V1=1;var e=Vi&&Vi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.default=n;const t=e(X7());function n(s,o){let l=null;if(!s||typeof s!="string")return l;const c=(0,t.default)(s),f=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:h}=p;f?o(m,h,p):h&&(l=l||{},l[m]=h)}),l}return Vi}var na={},U1;function eR(){if(U1)return na;U1=1,Object.defineProperty(na,"__esModule",{value:!0}),na.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(m){return!m||n.test(m)||e.test(m)},c=function(m,h){return h.toUpperCase()},f=function(m,h){return"".concat(h,"-")},p=function(m,h){return h===void 0&&(h={}),l(m)?m:(m=m.toLowerCase(),h.reactCompat?m=m.replace(o,f):m=m.replace(s,f),m.replace(t,c))};return na.camelCase=p,na}var ra,Z1;function tR(){if(Z1)return ra;Z1=1;var e=ra&&ra.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(J7()),n=eR();function s(o,l){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(f,p){f&&p&&(c[(0,n.camelCase)(f,l)]=p)}),c}return s.default=s,ra=s,ra}var nR=tR();const rR=ja(nR),sb=ib("end"),Cm=ib("start");function ib(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function sR(e){const t=Cm(e),n=sb(e);if(t&&n)return{start:t,end:n}}function la(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?W1(e.position):"start"in e||"end"in e?W1(e):"line"in e||"column"in e?wp(e):""}function wp(e){return q1(e&&e.line)+":"+q1(e&&e.column)}function W1(e){return wp(e&&e.start)+"-"+wp(e&&e.end)}function q1(e){return e&&typeof e=="number"?e:1}class un extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let o="",l={},c=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?o=t:!l.cause&&t&&(c=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof s=="string"){const p=s.indexOf(":");p===-1?l.ruleId=s:(l.source=s.slice(0,p),l.ruleId=s.slice(p+1))}if(!l.place&&l.ancestors&&l.ancestors){const p=l.ancestors[l.ancestors.length-1];p&&(l.place=p.position)}const f=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=la(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}un.prototype.file="";un.prototype.name="";un.prototype.reason="";un.prototype.message="";un.prototype.stack="";un.prototype.column=void 0;un.prototype.line=void 0;un.prototype.ancestors=void 0;un.prototype.cause=void 0;un.prototype.fatal=void 0;un.prototype.place=void 0;un.prototype.ruleId=void 0;un.prototype.source=void 0;const jm={}.hasOwnProperty,iR=new Map,oR=/[A-Z]/g,aR=new Set(["table","tbody","thead","tfoot","tr"]),lR=new Set(["td","th"]),ob="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cR(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=xR(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=gR(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Sm:Q7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=ab(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function ab(e,t,n){if(t.type==="element")return uR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pR(e,t,n);if(t.type==="mdxjsEsm")return fR(e,t);if(t.type==="root")return mR(e,t,n);if(t.type==="text")return hR(e,t)}function uR(e,t,n){const s=e.schema;let o=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(o=Sm,e.schema=o),e.ancestors.push(t);const l=cb(e,t.tagName,!1),c=yR(e,t);let f=Nm(e,t);return aR.has(t.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!$7(p):!0})),lb(e,c,l,t),Em(c,f),e.ancestors.pop(),e.schema=s,e.create(t,l,c,n)}function dR(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Sa(e,t.position)}function fR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Sa(e,t.position)}function pR(e,t,n){const s=e.schema;let o=s;t.name==="svg"&&s.space==="html"&&(o=Sm,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:cb(e,t.name,!0),c=vR(e,t),f=Nm(e,t);return lb(e,c,l,t),Em(c,f),e.ancestors.pop(),e.schema=s,e.create(t,l,c,n)}function mR(e,t,n){const s={};return Em(s,Nm(e,t)),e.create(t,e.Fragment,s,n)}function hR(e,t){return t.value}function lb(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function Em(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gR(e,t,n){return s;function s(o,l,c,f){const m=Array.isArray(c.children)?n:t;return f?m(l,c,f):m(l,c)}}function xR(e,t){return n;function n(s,o,l,c){const f=Array.isArray(l.children),p=Cm(s);return t(o,l,c,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function yR(e,t){const n={};let s,o;for(o in t.properties)if(o!=="children"&&jm.call(t.properties,o)){const l=bR(e,o,t.properties[o]);if(l){const[c,f]=l;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&lR.has(t.tagName)?s=f:n[c]=f}}if(s){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function vR(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const l=s.data.estree.body[0];l.type;const c=l.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Sa(e,t.position);else{const o=s.name;let l;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const f=s.value.data.estree.body[0];f.type,l=e.evaluater.evaluateExpression(f.expression)}else Sa(e,t.position);else l=s.value===null?!0:s.value;n[o]=l}return n}function Nm(e,t){const n=[];let s=-1;const o=e.passKeys?new Map:iR;for(;++s<t.children.length;){const l=t.children[s];let c;if(e.passKeys){const p=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(p){const m=o.get(p)||0;c=p+"-"+m,o.set(p,m+1)}}const f=ab(e,l,c);f!==void 0&&n.push(f)}return n}function bR(e,t,n){const s=q7(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?L7(n):Y7(n)),s.property==="style"){let o=typeof n=="object"?n:wR(e,String(n));return e.stylePropertyNameCase==="css"&&(o=kR(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&s.space?U7[s.property]||s.property:s.attribute,n]}}function wR(e,t){try{return rR(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,o=new un("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=ob+"#cannot-parse-style-attribute",o}}function cb(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,c;for(;++l<o.length;){const f=D1(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(l&&f.type==="Literal"),optional:!1}:f}s=c}else s=D1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const o=s.value;return jm.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(s);Sa(e)}function Sa(e,t){const n=new un("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ob+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kR(e){const t={};let n;for(n in e)jm.call(e,n)&&(t[SR(n)]=e[n]);return t}function SR(e){let t=e.replace(oR,CR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CR(e){return"-"+e.toLowerCase()}const jf={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"]},jR={};function Am(e,t){const n=jR,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ub(e,s,o)}function ub(e,t,n){if(ER(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return G1(e.children,t,n)}return Array.isArray(e)?G1(e,t,n):""}function G1(e,t,n){const s=[];let o=-1;for(;++o<e.length;)s[o]=ub(e[o],t,n);return s.join("")}function ER(e){return!!(e&&typeof e=="object")}const K1=document.createElement("i");function Rm(e){const t="&"+e+";";K1.innerHTML=t;const n=K1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Hn(e,t,n,s){const o=e.length;let l=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,s.length<1e4)c=Array.from(s),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);l<s.length;)c=s.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function tr(e,t){return e.length>0?(Hn(e,e.length,0,t),e):t}const Q1={}.hasOwnProperty;function db(e){const t={};let n=-1;for(;++n<e.length;)NR(t,e[n]);return t}function NR(e,t){let n;for(n in t){const o=(Q1.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){Q1.call(o,c)||(o[c]=[]);const f=l[c];AR(o[c],Array.isArray(f)?f:f?[f]:[])}}}function AR(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);Hn(e,0,0,s)}function fb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function hr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mn=Ds(/[A-Za-z]/),ln=Ds(/[\dA-Za-z]/),RR=Ds(/[#-'*+\--9=?A-Z^-~]/);function Cc(e){return e!==null&&(e<32||e===127)}const kp=Ds(/\d/),TR=Ds(/[\dA-Fa-f]/),IR=Ds(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function Je(e){return e===-2||e===-1||e===32}const lu=Ds(new RegExp("\\p{P}|\\p{S}","u")),ci=Ds(/\s/);function Ds(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function po(e){const t=[];let n=-1,s=0,o=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&ln(e.charCodeAt(n+1))&&ln(e.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const f=e.charCodeAt(n+1);l<56320&&f>56319&&f<57344?(c=String.fromCharCode(l,f),o=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(s,n),encodeURIComponent(c)),s=n+o+1,c=""),o&&(n+=o,o=0)}return t.join("")+e.slice(s)}function st(e,t,n,s){const o=s?s-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(p){return Je(p)?(e.enter(n),f(p)):t(p)}function f(p){return Je(p)&&l++<o?(e.consume(p),f):(e.exit(n),t(p))}}const PR={tokenize:MR};function MR(e){const t=e.attempt(this.parser.constructs.contentInitial,s,o);let n;return t;function s(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),st(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),l(f)}function l(f){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return $e(f)?(e.consume(f),e.exit("chunkText"),l):(e.consume(f),c)}}const _R={tokenize:LR},Y1={tokenize:FR};function LR(e){const t=this,n=[];let s=0,o,l,c;return f;function f(N){if(s<n.length){const M=n[s];return t.containerState=M[1],e.attempt(M[0].continuation,p,m)(N)}return m(N)}function p(N){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&E();const M=t.events.length;let _=M,R;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){R=t.events[_][1].end;break}j(s);let P=M;for(;P<t.events.length;)t.events[P][1].end={...R},P++;return Hn(t.events,_+1,0,t.events.slice(M)),t.events.length=P,m(N)}return f(N)}function m(N){if(s===n.length){if(!o)return y(N);if(o.currentConstruct&&o.currentConstruct.concrete)return k(N);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Y1,h,g)(N)}function h(N){return o&&E(),j(s),y(N)}function g(N){return t.parser.lazy[t.now().line]=s!==n.length,c=t.now().offset,k(N)}function y(N){return t.containerState={},e.attempt(Y1,b,k)(N)}function b(N){return s++,n.push([t.currentConstruct,t.containerState]),y(N)}function k(N){if(N===null){o&&E(),j(0),e.consume(N);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),w(N)}function w(N){if(N===null){S(e.exit("chunkFlow"),!0),j(0),e.consume(N);return}return $e(N)?(e.consume(N),S(e.exit("chunkFlow")),s=0,t.interrupt=void 0,f):(e.consume(N),w)}function S(N,M){const _=t.sliceStream(N);if(M&&_.push(null),N.previous=l,l&&(l.next=N),l=N,o.defineSkip(N.start),o.write(_),t.parser.lazy[N.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<c&&(!o.events[R][1].end||o.events[R][1].end.offset>c))return;const P=t.events.length;let L=P,G,D;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(G){D=t.events[L][1].end;break}G=!0}for(j(s),R=P;R<t.events.length;)t.events[R][1].end={...D},R++;Hn(t.events,L+1,0,t.events.slice(P)),t.events.length=R}}function j(N){let M=n.length;for(;M-- >N;){const _=n[M];t.containerState=_[1],_[0].exit.call(t,e)}n.length=N}function E(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function FR(e,t,n){return st(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ro(e){if(e===null||yt(e)||ci(e))return 1;if(lu(e))return 2}function cu(e,t,n){const s=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!s.includes(l)&&(t=l(t,n),s.push(l))}return t}const Sp={name:"attention",resolveAll:OR,tokenize:DR};function OR(e,t){let n=-1,s,o,l,c,f,p,m,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;p=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[s][1].end},y={...e[n][1].start};X1(g,-p),X1(y,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...e[s][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:p>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[s][1].end={...c.start},e[n][1].start={...f.end},m=[],e[s][1].end.offset-e[s][1].start.offset&&(m=tr(m,[["enter",e[s][1],t],["exit",e[s][1],t]])),m=tr(m,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",l,t]]),m=tr(m,cu(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),m=tr(m,[["exit",l,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,m=tr(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Hn(e,s-1,n-s+3,m),n=s+m.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DR(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,o=ro(s);let l;return c;function c(p){return l=p,e.enter("attentionSequence"),f(p)}function f(p){if(p===l)return e.consume(p),f;const m=e.exit("attentionSequence"),h=ro(p),g=!h||h===2&&o||n.includes(p),y=!o||o===2&&h||n.includes(s);return m._open=!!(l===42?g:g&&(o||!y)),m._close=!!(l===42?y:y&&(h||!g)),t(p)}}function X1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zR={name:"autolink",tokenize:$R};function $R(e,t,n){let s=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(b){return mn(b)?(e.consume(b),c):b===64?n(b):m(b)}function c(b){return b===43||b===45||b===46||ln(b)?(s=1,f(b)):m(b)}function f(b){return b===58?(e.consume(b),s=0,p):(b===43||b===45||b===46||ln(b))&&s++<32?(e.consume(b),f):(s=0,m(b))}function p(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Cc(b)?n(b):(e.consume(b),p)}function m(b){return b===64?(e.consume(b),h):RR(b)?(e.consume(b),m):n(b)}function h(b){return ln(b)?g(b):n(b)}function g(b){return b===46?(e.consume(b),s=0,h):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||ln(b))&&s++<63){const k=b===45?y:g;return e.consume(b),k}return n(b)}}const Ma={partial:!0,tokenize:HR};function HR(e,t,n){return s;function s(l){return Je(l)?st(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||$e(l)?t(l):n(l)}}const pb={continuation:{tokenize:VR},exit:UR,name:"blockQuote",tokenize:BR};function BR(e,t,n){const s=this;return o;function o(c){if(c===62){const f=s.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return n(c)}function l(c){return Je(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function VR(e,t,n){const s=this;return o;function o(c){return Je(c)?st(e,l,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(pb,t,n)(c)}}function UR(e){e.exit("blockQuote")}const mb={name:"characterEscape",tokenize:ZR};function ZR(e,t,n){return s;function s(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return IR(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const hb={name:"characterReference",tokenize:WR};function WR(e,t,n){const s=this;let o=0,l,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),p}function p(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),l=31,c=ln,h(g))}function m(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=TR,h):(e.enter("characterReferenceValue"),l=7,c=kp,h(g))}function h(g){if(g===59&&o){const y=e.exit("characterReferenceValue");return c===ln&&!Rm(s.sliceSerialize(y))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&o++<l?(e.consume(g),h):n(g)}}const J1={partial:!0,tokenize:GR},ex={concrete:!0,name:"codeFenced",tokenize:qR};function qR(e,t,n){const s=this,o={partial:!0,tokenize:_};let l=0,c=0,f;return p;function p(R){return m(R)}function m(R){const P=s.events[s.events.length-1];return l=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(R)}function h(R){return R===f?(c++,e.consume(R),h):c<3?n(R):(e.exit("codeFencedFenceSequence"),Je(R)?st(e,g,"whitespace")(R):g(R))}function g(R){return R===null||$e(R)?(e.exit("codeFencedFence"),s.interrupt?t(R):e.check(J1,w,M)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(R))}function y(R){return R===null||$e(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(R)):Je(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),st(e,b,"whitespace")(R)):R===96&&R===f?n(R):(e.consume(R),y)}function b(R){return R===null||$e(R)?g(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(R))}function k(R){return R===null||$e(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(R)):R===96&&R===f?n(R):(e.consume(R),k)}function w(R){return e.attempt(o,M,S)(R)}function S(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),j}function j(R){return l>0&&Je(R)?st(e,E,"linePrefix",l+1)(R):E(R)}function E(R){return R===null||$e(R)?e.check(J1,w,M)(R):(e.enter("codeFlowValue"),N(R))}function N(R){return R===null||$e(R)?(e.exit("codeFlowValue"),E(R)):(e.consume(R),N)}function M(R){return e.exit("codeFenced"),t(R)}function _(R,P,L){let G=0;return D;function D(F){return R.enter("lineEnding"),R.consume(F),R.exit("lineEnding"),B}function B(F){return R.enter("codeFencedFence"),Je(F)?st(R,W,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):W(F)}function W(F){return F===f?(R.enter("codeFencedFenceSequence"),Y(F)):L(F)}function Y(F){return F===f?(G++,R.consume(F),Y):G>=c?(R.exit("codeFencedFenceSequence"),Je(F)?st(R,Q,"whitespace")(F):Q(F)):L(F)}function Q(F){return F===null||$e(F)?(R.exit("codeFencedFence"),P(F)):L(F)}}}function GR(e,t,n){const s=this;return o;function o(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return s.parser.lazy[s.now().line]?n(c):t(c)}}const Ef={name:"codeIndented",tokenize:QR},KR={partial:!0,tokenize:YR};function QR(e,t,n){const s=this;return o;function o(m){return e.enter("codeIndented"),st(e,l,"linePrefix",5)(m)}function l(m){const h=s.events[s.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?p(m):$e(m)?e.attempt(KR,c,p)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||$e(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function p(m){return e.exit("codeIndented"),t(m)}}function YR(e,t,n){const s=this;return o;function o(c){return s.parser.lazy[s.now().line]?n(c):$e(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):st(e,l,"linePrefix",5)(c)}function l(c){const f=s.events[s.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):$e(c)?o(c):n(c)}}const XR={name:"codeText",previous:eT,resolve:JR,tokenize:tT};function JR(e){let t=e.length-4,n=3,s,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)o===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(o=s):(s===t||e[s][1].type==="lineEnding")&&(e[o][1].type="codeTextData",s!==o+2&&(e[o][1].end=e[s-1][1].end,e.splice(o+2,s-o-2),t-=s-o-2,s=o+2),o=void 0);return e}function eT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tT(e,t,n){let s=0,o,l;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),s++,f):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(l=e.enter("codeTextSequence"),o=0,h(g)):$e(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||$e(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),m)}function h(g){return g===96?(e.consume(g),o++,h):o===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(l.type="codeTextData",m(g))}}class nT{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const o=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return s&&sa(this.left,s),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),sa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),sa(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);sa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);sa(this.left,n.reverse())}}}function sa(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gb(e){const t={};let n=-1,s,o,l,c,f,p,m;const h=new nT(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(s=h.get(n),n&&s[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(p=s[1]._tokenizer.events,l=0,l<p.length&&p[l][1].type==="lineEndingBlank"&&(l+=2),l<p.length&&p[l][1].type==="content"))for(;++l<p.length&&p[l][1].type!=="content";)p[l][1].type==="chunkText"&&(p[l][1]._isInFirstContentOfListItem=!0,l++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,rT(h,n)),n=t[n],m=!0);else if(s[1]._container){for(l=n,o=void 0;l--;)if(c=h.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(h.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(s[1].end={...h.get(o)[1].start},f=h.slice(o,n),f.unshift(s),h.splice(o,n-o+1,f))}}return Hn(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!m}function rT(e,t){const n=e.get(t)[1],s=e.get(t)[2];let o=t-1;const l=[];let c=n._tokenizer;c||(c=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],m={};let h,g,y=-1,b=n,k=0,w=0;const S=[w];for(;b;){for(;e.get(++o)[1]!==b;);l.push(o),b._tokenizer||(h=s.sliceStream(b),b.next||h.push(null),g&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(h),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=n;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(w=y+1,S.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):S.pop(),y=S.length;y--;){const j=f.slice(S[y],S[y+1]),E=l.pop();p.push([E,E+j.length-1]),e.splice(E,2,j)}for(p.reverse(),y=-1;++y<p.length;)m[k+p[y][0]]=k+p[y][1],k+=p[y][1]-p[y][0]-1;return m}const sT={resolve:oT,tokenize:aT},iT={partial:!0,tokenize:lT};function oT(e){return gb(e),e}function aT(e,t){let n;return s;function s(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?l(f):$e(f)?e.check(iT,c,l)(f):(e.consume(f),o)}function l(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function lT(e,t,n){const s=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),st(e,l,"linePrefix")}function l(c){if(c===null||$e(c))return n(c);const f=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(s.parser.constructs.flow,n,t)(c)}}function xb(e,t,n,s,o,l,c,f,p){const m=p||Number.POSITIVE_INFINITY;let h=0;return g;function g(j){return j===60?(e.enter(s),e.enter(o),e.enter(l),e.consume(j),e.exit(l),y):j===null||j===32||j===41||Cc(j)?n(j):(e.enter(s),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(j))}function y(j){return j===62?(e.enter(l),e.consume(j),e.exit(l),e.exit(o),e.exit(s),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===62?(e.exit("chunkString"),e.exit(f),y(j)):j===null||j===60||$e(j)?n(j):(e.consume(j),j===92?k:b)}function k(j){return j===60||j===62||j===92?(e.consume(j),b):b(j)}function w(j){return!h&&(j===null||j===41||yt(j))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(s),t(j)):h<m&&j===40?(e.consume(j),h++,w):j===41?(e.consume(j),h--,w):j===null||j===32||j===40||Cc(j)?n(j):(e.consume(j),j===92?S:w)}function S(j){return j===40||j===41||j===92?(e.consume(j),w):w(j)}}function yb(e,t,n,s,o,l){const c=this;let f=0,p;return m;function m(b){return e.enter(s),e.enter(o),e.consume(b),e.exit(o),e.enter(l),h}function h(b){return f>999||b===null||b===91||b===93&&!p||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(l),e.enter(o),e.consume(b),e.exit(o),e.exit(s),t):$e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||$e(b)||f++>999?(e.exit("chunkString"),h(b)):(e.consume(b),p||(p=!Je(b)),b===92?y:g)}function y(b){return b===91||b===92||b===93?(e.consume(b),f++,g):g(b)}}function vb(e,t,n,s,o,l){let c;return f;function f(y){return y===34||y===39||y===40?(e.enter(s),e.enter(o),e.consume(y),e.exit(o),c=y===40?41:y,p):n(y)}function p(y){return y===c?(e.enter(o),e.consume(y),e.exit(o),e.exit(s),t):(e.enter(l),m(y))}function m(y){return y===c?(e.exit(l),p(c)):y===null?n(y):$e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),st(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===c||y===null||$e(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?g:h)}function g(y){return y===c||y===92?(e.consume(y),h):h(y)}}function ca(e,t){let n;return s;function s(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,s):Je(o)?st(e,s,n?"linePrefix":"lineSuffix")(o):t(o)}}const cT={name:"definition",tokenize:dT},uT={partial:!0,tokenize:fT};function dT(e,t,n){const s=this;let o;return l;function l(b){return e.enter("definition"),c(b)}function c(b){return yb.call(s,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=hr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):n(b)}function p(b){return yt(b)?ca(e,m)(b):m(b)}function m(b){return xb(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function h(b){return e.attempt(uT,g,g)(b)}function g(b){return Je(b)?st(e,y,"whitespace")(b):y(b)}function y(b){return b===null||$e(b)?(e.exit("definition"),s.parser.defined.push(o),t(b)):n(b)}}function fT(e,t,n){return s;function s(f){return yt(f)?ca(e,o)(f):n(f)}function o(f){return vb(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function l(f){return Je(f)?st(e,c,"whitespace")(f):c(f)}function c(f){return f===null||$e(f)?t(f):n(f)}}const pT={name:"hardBreakEscape",tokenize:mT};function mT(e,t,n){return s;function s(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return $e(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const hT={name:"headingAtx",resolve:gT,tokenize:xT};function gT(e,t){let n=e.length-2,s=3,o,l;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(o={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},l={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},Hn(e,s,n-s+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function xT(e,t,n){let s=0;return o;function o(h){return e.enter("atxHeading"),l(h)}function l(h){return e.enter("atxHeadingSequence"),c(h)}function c(h){return h===35&&s++<6?(e.consume(h),c):h===null||yt(h)?(e.exit("atxHeadingSequence"),f(h)):n(h)}function f(h){return h===35?(e.enter("atxHeadingSequence"),p(h)):h===null||$e(h)?(e.exit("atxHeading"),t(h)):Je(h)?st(e,f,"whitespace")(h):(e.enter("atxHeadingText"),m(h))}function p(h){return h===35?(e.consume(h),p):(e.exit("atxHeadingSequence"),f(h))}function m(h){return h===null||h===35||yt(h)?(e.exit("atxHeadingText"),f(h)):(e.consume(h),m)}}const yT=["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"],tx=["pre","script","style","textarea"],vT={concrete:!0,name:"htmlFlow",resolveTo:kT,tokenize:ST},bT={partial:!0,tokenize:jT},wT={partial:!0,tokenize:CT};function kT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(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}function ST(e,t,n){const s=this;let o,l,c,f,p;return m;function m(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),g}function g(I){return I===33?(e.consume(I),y):I===47?(e.consume(I),l=!0,w):I===63?(e.consume(I),o=3,s.interrupt?t:T):mn(I)?(e.consume(I),c=String.fromCharCode(I),S):n(I)}function y(I){return I===45?(e.consume(I),o=2,b):I===91?(e.consume(I),o=5,f=0,k):mn(I)?(e.consume(I),o=4,s.interrupt?t:T):n(I)}function b(I){return I===45?(e.consume(I),s.interrupt?t:T):n(I)}function k(I){const ie="CDATA[";return I===ie.charCodeAt(f++)?(e.consume(I),f===ie.length?s.interrupt?t:W:k):n(I)}function w(I){return mn(I)?(e.consume(I),c=String.fromCharCode(I),S):n(I)}function S(I){if(I===null||I===47||I===62||yt(I)){const ie=I===47,se=c.toLowerCase();return!ie&&!l&&tx.includes(se)?(o=1,s.interrupt?t(I):W(I)):yT.includes(c.toLowerCase())?(o=6,ie?(e.consume(I),j):s.interrupt?t(I):W(I)):(o=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(I):l?E(I):N(I))}return I===45||ln(I)?(e.consume(I),c+=String.fromCharCode(I),S):n(I)}function j(I){return I===62?(e.consume(I),s.interrupt?t:W):n(I)}function E(I){return Je(I)?(e.consume(I),E):D(I)}function N(I){return I===47?(e.consume(I),D):I===58||I===95||mn(I)?(e.consume(I),M):Je(I)?(e.consume(I),N):D(I)}function M(I){return I===45||I===46||I===58||I===95||ln(I)?(e.consume(I),M):_(I)}function _(I){return I===61?(e.consume(I),R):Je(I)?(e.consume(I),_):N(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),p=I,P):Je(I)?(e.consume(I),R):L(I)}function P(I){return I===p?(e.consume(I),p=null,G):I===null||$e(I)?n(I):(e.consume(I),P)}function L(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||yt(I)?_(I):(e.consume(I),L)}function G(I){return I===47||I===62||Je(I)?N(I):n(I)}function D(I){return I===62?(e.consume(I),B):n(I)}function B(I){return I===null||$e(I)?W(I):Je(I)?(e.consume(I),B):n(I)}function W(I){return I===45&&o===2?(e.consume(I),Z):I===60&&o===1?(e.consume(I),K):I===62&&o===4?(e.consume(I),z):I===63&&o===3?(e.consume(I),T):I===93&&o===5?(e.consume(I),J):$e(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(bT,H,Y)(I)):I===null||$e(I)?(e.exit("htmlFlowData"),Y(I)):(e.consume(I),W)}function Y(I){return e.check(wT,Q,H)(I)}function Q(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),F}function F(I){return I===null||$e(I)?Y(I):(e.enter("htmlFlowData"),W(I))}function Z(I){return I===45?(e.consume(I),T):W(I)}function K(I){return I===47?(e.consume(I),c="",O):W(I)}function O(I){if(I===62){const ie=c.toLowerCase();return tx.includes(ie)?(e.consume(I),z):W(I)}return mn(I)&&c.length<8?(e.consume(I),c+=String.fromCharCode(I),O):W(I)}function J(I){return I===93?(e.consume(I),T):W(I)}function T(I){return I===62?(e.consume(I),z):I===45&&o===2?(e.consume(I),T):W(I)}function z(I){return I===null||$e(I)?(e.exit("htmlFlowData"),H(I)):(e.consume(I),z)}function H(I){return e.exit("htmlFlow"),t(I)}}function CT(e,t,n){const s=this;return o;function o(c){return $e(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return s.parser.lazy[s.now().line]?n(c):t(c)}}function jT(e,t,n){return s;function s(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ma,t,n)}}const ET={name:"htmlText",tokenize:NT};function NT(e,t,n){const s=this;let o,l,c;return f;function f(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),p}function p(T){return T===33?(e.consume(T),m):T===47?(e.consume(T),_):T===63?(e.consume(T),N):mn(T)?(e.consume(T),L):n(T)}function m(T){return T===45?(e.consume(T),h):T===91?(e.consume(T),l=0,k):mn(T)?(e.consume(T),E):n(T)}function h(T){return T===45?(e.consume(T),b):n(T)}function g(T){return T===null?n(T):T===45?(e.consume(T),y):$e(T)?(c=g,K(T)):(e.consume(T),g)}function y(T){return T===45?(e.consume(T),b):g(T)}function b(T){return T===62?Z(T):T===45?y(T):g(T)}function k(T){const z="CDATA[";return T===z.charCodeAt(l++)?(e.consume(T),l===z.length?w:k):n(T)}function w(T){return T===null?n(T):T===93?(e.consume(T),S):$e(T)?(c=w,K(T)):(e.consume(T),w)}function S(T){return T===93?(e.consume(T),j):w(T)}function j(T){return T===62?Z(T):T===93?(e.consume(T),j):w(T)}function E(T){return T===null||T===62?Z(T):$e(T)?(c=E,K(T)):(e.consume(T),E)}function N(T){return T===null?n(T):T===63?(e.consume(T),M):$e(T)?(c=N,K(T)):(e.consume(T),N)}function M(T){return T===62?Z(T):N(T)}function _(T){return mn(T)?(e.consume(T),R):n(T)}function R(T){return T===45||ln(T)?(e.consume(T),R):P(T)}function P(T){return $e(T)?(c=P,K(T)):Je(T)?(e.consume(T),P):Z(T)}function L(T){return T===45||ln(T)?(e.consume(T),L):T===47||T===62||yt(T)?G(T):n(T)}function G(T){return T===47?(e.consume(T),Z):T===58||T===95||mn(T)?(e.consume(T),D):$e(T)?(c=G,K(T)):Je(T)?(e.consume(T),G):Z(T)}function D(T){return T===45||T===46||T===58||T===95||ln(T)?(e.consume(T),D):B(T)}function B(T){return T===61?(e.consume(T),W):$e(T)?(c=B,K(T)):Je(T)?(e.consume(T),B):G(T)}function W(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),o=T,Y):$e(T)?(c=W,K(T)):Je(T)?(e.consume(T),W):(e.consume(T),Q)}function Y(T){return T===o?(e.consume(T),o=void 0,F):T===null?n(T):$e(T)?(c=Y,K(T)):(e.consume(T),Y)}function Q(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||yt(T)?G(T):(e.consume(T),Q)}function F(T){return T===47||T===62||yt(T)?G(T):n(T)}function Z(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function K(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),O}function O(T){return Je(T)?st(e,J,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):J(T)}function J(T){return e.enter("htmlTextData"),c(T)}}const Tm={name:"labelEnd",resolveAll:IT,resolveTo:PT,tokenize:MT},AT={tokenize:_T},RT={tokenize:LT},TT={tokenize:FT};function IT(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const o=s.type==="labelImage"?4:2;s.type="data",t+=o}}return e.length!==n.length&&Hn(e,0,e.length,n),e}function PT(e,t){let n=e.length,s=0,o,l,c,f;for(;n--;)if(o=e[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){s=2;break}}else o.type==="labelEnd"&&(c=n);const p={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},h={type:"labelText",start:{...e[l+s+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",p,t],["enter",m,t]],f=tr(f,e.slice(l+1,l+s+3)),f=tr(f,[["enter",h,t]]),f=tr(f,cu(t.parser.constructs.insideSpan.null,e.slice(l+s+4,c-3),t)),f=tr(f,[["exit",h,t],e[c-2],e[c-1],["exit",m,t]]),f=tr(f,e.slice(c+1)),f=tr(f,[["exit",p,t]]),Hn(e,l,e.length,f),e}function MT(e,t,n){const s=this;let o=s.events.length,l,c;for(;o--;)if((s.events[o][1].type==="labelImage"||s.events[o][1].type==="labelLink")&&!s.events[o][1]._balanced){l=s.events[o][1];break}return f;function f(y){return l?l._inactive?g(y):(c=s.parser.defined.includes(hr(s.sliceSerialize({start:l.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),p):n(y)}function p(y){return y===40?e.attempt(AT,h,c?h:g)(y):y===91?e.attempt(RT,h,c?m:g)(y):c?h(y):g(y)}function m(y){return e.attempt(TT,h,g)(y)}function h(y){return t(y)}function g(y){return l._balanced=!0,n(y)}}function _T(e,t,n){return s;function s(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return yt(g)?ca(e,l)(g):l(g)}function l(g){return g===41?h(g):xb(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return yt(g)?ca(e,p)(g):h(g)}function f(g){return n(g)}function p(g){return g===34||g===39||g===40?vb(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):h(g)}function m(g){return yt(g)?ca(e,h)(g):h(g)}function h(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function LT(e,t,n){const s=this;return o;function o(f){return yb.call(s,e,l,c,"reference","referenceMarker","referenceString")(f)}function l(f){return s.parser.defined.includes(hr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function FT(e,t,n){return s;function s(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const OT={name:"labelStartImage",resolveAll:Tm.resolveAll,tokenize:DT};function DT(e,t,n){const s=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),l}function l(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):t(f)}}const zT={name:"labelStartLink",resolveAll:Tm.resolveAll,tokenize:$T};function $T(e,t,n){const s=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(c):t(c)}}const Nf={name:"lineEnding",tokenize:HT};function HT(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),st(e,t,"linePrefix")}}const lc={name:"thematicBreak",tokenize:BT};function BT(e,t,n){let s=0,o;return l;function l(m){return e.enter("thematicBreak"),c(m)}function c(m){return o=m,f(m)}function f(m){return m===o?(e.enter("thematicBreakSequence"),p(m)):s>=3&&(m===null||$e(m))?(e.exit("thematicBreak"),t(m)):n(m)}function p(m){return m===o?(e.consume(m),s++,p):(e.exit("thematicBreakSequence"),Je(m)?st(e,f,"whitespace")(m):f(m))}}const Sn={continuation:{tokenize:WT},exit:GT,name:"list",tokenize:ZT},VT={partial:!0,tokenize:KT},UT={partial:!0,tokenize:qT};function ZT(e,t,n){const s=this,o=s.events[s.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(b){const k=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:kp(b)){if(s.containerState.type||(s.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(lc,n,m)(b):m(b);if(!s.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return kp(b)&&++c<10?(e.consume(b),p):(!s.interrupt||c<2)&&(s.containerState.marker?b===s.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),m(b)):n(b)}function m(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||b,e.check(Ma,s.interrupt?n:h,e.attempt(VT,y,g))}function h(b){return s.containerState.initialBlankLine=!0,l++,y(b)}function g(b){return Je(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return s.containerState.size=l+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function WT(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(Ma,o,l);function o(f){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,st(e,t,"listItemIndent",s.containerState.size+1)(f)}function l(f){return s.containerState.furtherBlankLines||!Je(f)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,c(f)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(UT,t,c)(f))}function c(f){return s.containerState._closeFlow=!0,s.interrupt=void 0,st(e,e.attempt(Sn,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function qT(e,t,n){const s=this;return st(e,o,"listItemIndent",s.containerState.size+1);function o(l){const c=s.events[s.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===s.containerState.size?t(l):n(l)}}function GT(e){e.exit(this.containerState.type)}function KT(e,t,n){const s=this;return st(e,o,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const c=s.events[s.events.length-1];return!Je(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const nx={name:"setextUnderline",resolveTo:QT,tokenize:YT};function QT(e,t){let n=e.length,s,o,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const c={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",c,t]),e.splice(l+1,0,["exit",e[s][1],t]),e[s][1].end={...e[l][1].end}):e[s][1]=c,e.push(["exit",c,t]),e}function YT(e,t,n){const s=this;let o;return l;function l(m){let h=s.events.length,g;for(;h--;)if(s.events[h][1].type!=="lineEnding"&&s.events[h][1].type!=="linePrefix"&&s.events[h][1].type!=="content"){g=s.events[h][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||g)?(e.enter("setextHeadingLine"),o=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===o?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),Je(m)?st(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||$e(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const XT={tokenize:JT};function JT(e){const t=this,n=e.attempt(Ma,s,e.attempt(this.parser.constructs.flowInitial,o,st(e,e.attempt(this.parser.constructs.flow,o,e.attempt(sT,o)),"linePrefix")));return n;function s(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const eI={resolveAll:wb()},tI=bb("string"),nI=bb("text");function bb(e){return{resolveAll:wb(e==="text"?rI:void 0),tokenize:t};function t(n){const s=this,o=this.parser.constructs[e],l=n.attempt(o,c,f);return c;function c(h){return m(h)?l(h):f(h)}function f(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),p}function p(h){return m(h)?(n.exit("data"),l(h)):(n.consume(h),p)}function m(h){if(h===null)return!0;const g=o[h];let y=-1;if(g)for(;++y<g.length;){const b=g[y];if(!b.previous||b.previous.call(s,s.previous))return!0}return!1}}}function wb(e){return t;function t(n,s){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(n,s):n}}function rI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const s=e[n-1][1],o=t.sliceStream(s);let l=o.length,c=-1,f=0,p;for(;l--;){const m=o[l];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)p=!0,f++;else if(m!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:s.start._bufferIndex+c,_index:s.start._index+l,line:s.end.line,column:s.end.column-f,offset:s.end.offset-f},end:{...s.end}};s.end={...m.start},s.start.offset===s.end.offset?Object.assign(s,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const sI={42:Sn,43:Sn,45:Sn,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,62:pb},iI={91:cT},oI={[-2]:Ef,[-1]:Ef,32:Ef},aI={35:hT,42:lc,45:[nx,lc],60:vT,61:nx,95:lc,96:ex,126:ex},lI={38:hb,92:mb},cI={[-5]:Nf,[-4]:Nf,[-3]:Nf,33:OT,38:hb,42:Sp,60:[zR,ET],91:zT,92:[pT,mb],93:Tm,95:Sp,96:XR},uI={null:[Sp,eI]},dI={null:[42,95]},fI={null:[]},pI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dI,contentInitial:iI,disable:fI,document:sI,flow:aI,flowInitial:oI,insideSpan:uI,string:lI,text:cI},Symbol.toStringTag,{value:"Module"}));function mI(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let c=[],f=[];const p={attempt:P(_),check:P(R),consume:E,enter:N,exit:M,interrupt:P(R,{interrupt:!0})},m={code:null,containerState:{},defineSkip:w,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:g};let h=t.tokenize.call(m,p);return t.resolveAll&&l.push(t),m;function g(B){return c=tr(c,B),S(),c[c.length-1]!==null?[]:(L(t,0),m.events=cu(l,m.events,m),m.events)}function y(B,W){return gI(b(B),W)}function b(B){return hI(c,B)}function k(){const{_bufferIndex:B,_index:W,line:Y,column:Q,offset:F}=s;return{_bufferIndex:B,_index:W,line:Y,column:Q,offset:F}}function w(B){o[B.line]=B.column,D()}function S(){let B;for(;s._index<c.length;){const W=c[s._index];if(typeof W=="string")for(B=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===B&&s._bufferIndex<W.length;)j(W.charCodeAt(s._bufferIndex));else j(W)}}function j(B){h=h(B)}function E(B){$e(B)?(s.line++,s.column=1,s.offset+=B===-3?2:1,D()):B!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===c[s._index].length&&(s._bufferIndex=-1,s._index++)),m.previous=B}function N(B,W){const Y=W||{};return Y.type=B,Y.start=k(),m.events.push(["enter",Y,m]),f.push(Y),Y}function M(B){const W=f.pop();return W.end=k(),m.events.push(["exit",W,m]),W}function _(B,W){L(B,W.from)}function R(B,W){W.restore()}function P(B,W){return Y;function Y(Q,F,Z){let K,O,J,T;return Array.isArray(Q)?H(Q):"tokenize"in Q?H([Q]):z(Q);function z(le){return te;function te(oe){const ce=oe!==null&&le[oe],re=oe!==null&&le.null,ge=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(re)?re:re?[re]:[]];return H(ge)(oe)}}function H(le){return K=le,O=0,le.length===0?Z:I(le[O])}function I(le){return te;function te(oe){return T=G(),J=le,le.partial||(m.currentConstruct=le),le.name&&m.parser.constructs.disable.null.includes(le.name)?se():le.tokenize.call(W?Object.assign(Object.create(m),W):m,p,ie,se)(oe)}}function ie(le){return B(J,T),F}function se(le){return T.restore(),++O<K.length?I(K[O]):Z}}}function L(B,W){B.resolveAll&&!l.includes(B)&&l.push(B),B.resolve&&Hn(m.events,W,m.events.length-W,B.resolve(m.events.slice(W),m)),B.resolveTo&&(m.events=B.resolveTo(m.events,m))}function G(){const B=k(),W=m.previous,Y=m.currentConstruct,Q=m.events.length,F=Array.from(f);return{from:Q,restore:Z};function Z(){s=B,m.previous=W,m.currentConstruct=Y,m.events.length=Q,f=F,D()}}function D(){s.line in o&&s.column<2&&(s.column=o[s.line],s.offset+=o[s.line]-1)}}function hI(e,t){const n=t.start._index,s=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let c;if(n===o)c=[e[n].slice(s,l)];else{if(c=e.slice(n,o),s>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(s):c.shift()}l>0&&c.push(e[o].slice(0,l))}return c}function gI(e,t){let n=-1;const s=[];let o;for(;++n<e.length;){const l=e[n];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
|
|
96
|
+
`;break}case-3:{c=`\r
|
|
97
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(l)}o=l===-2,s.push(c)}return s.join("")}function xI(e){const s={constructs:db([pI,...(e||{}).extensions||[]]),content:o(PR),defined:[],document:o(_R),flow:o(XT),lazy:{},string:o(tI),text:o(nI)};return s;function o(l){return c;function c(f){return mI(s,l,f)}}}function yI(e){for(;!gb(e););return e}const rx=/[\0\t\n\r]/g;function vI(){let e=1,t="",n=!0,s;return o;function o(l,c,f){const p=[];let m,h,g,y,b;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),g=0,t="",n&&(l.charCodeAt(0)===65279&&g++,n=void 0);g<l.length;){if(rx.lastIndex=g,m=rx.exec(l),y=m&&m.index!==void 0?m.index:l.length,b=l.charCodeAt(y),!m){t=l.slice(g);break}if(b===10&&g===y&&s)p.push(-3),s=void 0;else switch(s&&(p.push(-5),s=void 0),g<y&&(p.push(l.slice(g,y)),e+=y-g),b){case 0:{p.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,p.push(-2);e++<h;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:s=!0,e=1}g=y+1}return f&&(s&&p.push(-5),t&&p.push(t),p.push(null)),p}}const bI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wI(e){return e.replace(bI,kI)}function kI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return fb(n.slice(l?2:1),l?16:10)}return Rm(n)||e}const kb={}.hasOwnProperty;function SI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),CI(n)(yI(xI(n).document().write(vI()(e,t,!0))))}function CI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(et),autolinkProtocol:G,autolinkEmail:G,atxHeading:l(ct),blockQuote:l(re),characterEscape:G,characterReference:G,codeFenced:l(ge),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(ge,c),codeText:l(be,c),codeTextData:G,data:G,codeFlowValue:G,definition:l(Pe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Ze),hardBreakEscape:l(ft),hardBreakTrailing:l(ft),htmlFlow:l(Ye,c),htmlFlowData:G,htmlText:l(Ye,c),htmlTextData:G,image:l(jt),label:c,link:l(et),listItem:l(Qt),listItemValue:y,listOrdered:l(Kt,g),listUnordered:l(Kt),paragraph:l(nn),reference:I,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(ct),strong:l(vt),thematicBreak:l(rr)},exit:{atxHeading:p(),atxHeadingSequence:_,autolink:p(),autolinkEmail:ce,autolinkProtocol:oe,blockQuote:p(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:le,characterReference:te,codeFenced:p(S),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:k,codeFlowValue:D,codeIndented:p(j),codeText:p(F),codeTextData:D,data:D,definition:p(),definitionDestinationString:M,definitionLabelString:E,definitionTitleString:N,emphasis:p(),hardBreakEscape:p(W),hardBreakTrailing:p(W),htmlFlow:p(Y),htmlFlowData:D,htmlText:p(Q),htmlTextData:D,image:p(K),label:J,labelText:O,lineEnding:B,link:p(Z),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ie,resourceDestinationString:T,resourceTitleString:z,resource:H,setextHeading:p(L),setextHeadingLineSequence:P,setextHeadingText:R,strong:p(),thematicBreak:p()}};Sb(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(ae){let xe={type:"root",children:[]};const de={stack:[xe],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:h,data:n},fe=[];let ke=-1;for(;++ke<ae.length;)if(ae[ke][1].type==="listOrdered"||ae[ke][1].type==="listUnordered")if(ae[ke][0]==="enter")fe.push(ke);else{const Be=fe.pop();ke=o(ae,Be,ke)}for(ke=-1;++ke<ae.length;){const Be=t[ae[ke][0]];kb.call(Be,ae[ke][1].type)&&Be[ae[ke][1].type].call(Object.assign({sliceSerialize:ae[ke][2].sliceSerialize},de),ae[ke][1])}if(de.tokenStack.length>0){const Be=de.tokenStack[de.tokenStack.length-1];(Be[1]||sx).call(de,void 0,Be[0])}for(xe.position={start:Cs(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:Cs(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke<t.transforms.length;)xe=t.transforms[ke](xe)||xe;return xe}function o(ae,xe,de){let fe=xe-1,ke=-1,Be=!1,Ke,it,ot,bt;for(;++fe<=de;){const ht=ae[fe];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?ke++:ke--,bt=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(Ke&&!bt&&!ke&&!ot&&(ot=fe),bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bt=void 0}if(!ke&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||ke===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(Ke){let Lt=fe;for(it=void 0;Lt--;){const Ft=ae[Lt];if(Ft[1].type==="lineEnding"||Ft[1].type==="lineEndingBlank"){if(Ft[0]==="exit")continue;it&&(ae[it][1].type="lineEndingBlank",Be=!0),Ft[1].type="lineEnding",it=Lt}else if(!(Ft[1].type==="linePrefix"||Ft[1].type==="blockQuotePrefix"||Ft[1].type==="blockQuotePrefixWhitespace"||Ft[1].type==="blockQuoteMarker"||Ft[1].type==="listItemIndent"))break}ot&&(!it||ot<it)&&(Ke._spread=!0),Ke.end=Object.assign({},it?ae[it][1].start:ht[1].end),ae.splice(it||fe,0,["exit",Ke,ht[2]]),fe++,de++}if(ht[1].type==="listItemPrefix"){const Lt={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};Ke=Lt,ae.splice(fe,0,["enter",Lt,ht[2]]),fe++,de++,ot=void 0,bt=!0}}}return ae[xe][1]._spread=Be,de}function l(ae,xe){return de;function de(fe){f.call(this,ae(fe),fe),xe&&xe.call(this,fe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ae,xe,de){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([xe,de||void 0]),ae.position={start:Cs(xe.start),end:void 0}}function p(ae){return xe;function xe(de){ae&&ae.call(this,de),m.call(this,de)}}function m(ae,xe){const de=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==ae.type&&(xe?xe.call(this,ae,fe[0]):(fe[1]||sx).call(this,ae,fe[0]));else throw new Error("Cannot close `"+ae.type+"` ("+la({start:ae.start,end:ae.end})+"): it’s not open");de.position.end=Cs(ae.end)}function h(){return Am(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function y(ae){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ae}function k(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ae}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae.replace(/(\r?\n|\r)$/g,"")}function E(ae){const xe=this.resume(),de=this.stack[this.stack.length-1];de.label=xe,de.identifier=hr(this.sliceSerialize(ae)).toLowerCase()}function N(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ae}function M(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ae}function _(ae){const xe=this.stack[this.stack.length-1];if(!xe.depth){const de=this.sliceSerialize(ae).length;xe.depth=de}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function P(ae){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function G(ae){const de=this.stack[this.stack.length-1].children;let fe=de[de.length-1];(!fe||fe.type!=="text")&&(fe=Bn(),fe.position={start:Cs(ae.start),end:void 0},de.push(fe)),this.stack.push(fe)}function D(ae){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ae),xe.position.end=Cs(ae.end)}function B(ae){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=xe.children[xe.children.length-1];de.position.end=Cs(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(G.call(this,ae),D.call(this,ae))}function W(){this.data.atHardBreak=!0}function Y(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae}function Q(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae}function F(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae}function Z(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=xe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function K(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=xe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function O(ae){const xe=this.sliceSerialize(ae),de=this.stack[this.stack.length-2];de.label=wI(xe),de.identifier=hr(xe).toLowerCase()}function J(){const ae=this.stack[this.stack.length-1],xe=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const fe=ae.children;de.children=fe}else de.alt=xe}function T(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ae}function z(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ae}function H(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ie(ae){const xe=this.resume(),de=this.stack[this.stack.length-1];de.label=xe,de.identifier=hr(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function se(ae){this.data.characterReferenceType=ae.type}function le(ae){const xe=this.sliceSerialize(ae),de=this.data.characterReferenceType;let fe;de?(fe=fb(xe,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=Rm(xe);const ke=this.stack[this.stack.length-1];ke.value+=fe}function te(ae){const xe=this.stack.pop();xe.position.end=Cs(ae.end)}function oe(ae){D.call(this,ae);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ae)}function ce(ae){D.call(this,ae);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ae)}function re(){return{type:"blockquote",children:[]}}function ge(){return{type:"code",lang:null,meta:null,value:""}}function be(){return{type:"inlineCode",value:""}}function Pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ze(){return{type:"emphasis",children:[]}}function ct(){return{type:"heading",depth:0,children:[]}}function ft(){return{type:"break"}}function Ye(){return{type:"html",value:""}}function jt(){return{type:"image",title:null,url:"",alt:null}}function et(){return{type:"link",title:null,url:"",children:[]}}function Kt(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function Qt(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function nn(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function Bn(){return{type:"text",value:""}}function rr(){return{type:"thematicBreak"}}}function Cs(e){return{line:e.line,column:e.column,offset:e.offset}}function Sb(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?Sb(e,s):jI(e,s)}}function jI(e,t){let n;for(n in t)if(kb.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function sx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+la({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+la({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+la({start:t.start,end:t.end})+") is still open")}function EI(e){const t=this;t.parser=n;function n(s){return SI(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function NI(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function AI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
98
|
+
`}]}function RI(e,t){const n=t.value?t.value+`
|
|
99
|
+
`:"",s={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(s.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function TI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function II(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),o=po(s.toLowerCase()),l=e.footnoteOrder.indexOf(s);let c,f=e.footnoteCounts.get(s);f===void 0?(f=0,e.footnoteOrder.push(s),c=e.footnoteOrder.length):c=l+1,f+=1,e.footnoteCounts.set(s,f);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,m),e.applyData(t,m)}function MI(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _I(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Cb(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const o=e.all(t),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=s:o.push({type:"text",value:s}),o}function LI(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return Cb(e,t);const o={src:po(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(o.title=s.title);const l={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,l),e.applyData(t,l)}function FI(e,t){const n={src:po(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function OI(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function DI(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return Cb(e,t);const o={href:po(s.url||"")};s.title!==null&&s.title!==void 0&&(o.title=s.title);const l={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function zI(e,t){const n={href:po(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function $I(e,t,n){const s=e.all(t),o=n?HI(n):jb(t),l={},c=[];if(typeof t.checked=="boolean"){const h=s[0];let g;h&&h.type==="element"&&h.tagName==="p"?g=h:(g={type:"element",tagName:"p",properties:{},children:[]},s.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let f=-1;for(;++f<s.length;){const h=s[f];(o||f!==0||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
100
|
+
`}),h.type==="element"&&h.tagName==="p"&&!o?c.push(...h.children):c.push(h)}const p=s[s.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
101
|
+
`});const m={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,m),e.applyData(t,m)}function HI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=jb(n[s])}return t}function jb(e){const t=e.spread;return t??e.children.length>1}function BI(e,t){const n={},s=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<s.length;){const c=s[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function VI(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UI(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ZI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WI(e,t){const n=e.all(t),s=n.shift(),o=[];if(s){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],c),o.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Cm(t.children[1]),p=sb(t.children[t.children.length-1]);f&&p&&(c.position={start:f,end:p}),o.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function qI(e,t,n){const s=n?n.children:void 0,l=(s?s.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let p=-1;const m=[];for(;++p<f;){const g=t.children[p],y={},b=c?c[p]:void 0;b&&(y.align=b);let k={type:"element",tagName:l,properties:y,children:[]};g&&(k.children=e.all(g),e.patch(g,k),k=e.applyData(g,k)),m.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,h),e.applyData(t,h)}function GI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ix=9,ox=32;function KI(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),o=0;const l=[];for(;s;)l.push(ax(t.slice(o,s.index),o>0,!0),s[0]),o=s.index+s[0].length,s=n.exec(t);return l.push(ax(t.slice(o),o>0,!1)),l.join("")}function ax(e,t,n){let s=0,o=e.length;if(t){let l=e.codePointAt(s);for(;l===ix||l===ox;)s++,l=e.codePointAt(s)}if(n){let l=e.codePointAt(o-1);for(;l===ix||l===ox;)o--,l=e.codePointAt(o-1)}return o>s?e.slice(s,o):""}function QI(e,t){const n={type:"text",value:KI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function YI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const XI={blockquote:NI,break:AI,code:RI,delete:TI,emphasis:II,footnoteReference:PI,heading:MI,html:_I,imageReference:LI,image:FI,inlineCode:OI,linkReference:DI,link:zI,listItem:$I,list:BI,paragraph:VI,root:UI,strong:ZI,table:WI,tableCell:GI,tableRow:qI,text:QI,thematicBreak:YI,toml:tc,yaml:tc,definition:tc,footnoteDefinition:tc};function tc(){}const Eb=-1,uu=0,ua=1,jc=2,Im=3,Pm=4,Mm=5,_m=6,Nb=7,Ab=8,lx=typeof self=="object"?self:globalThis,JI=(e,t)=>{const n=(o,l)=>(e.set(l,o),o),s=o=>{if(e.has(o))return e.get(o);const[l,c]=t[o];switch(l){case uu:case Eb:return n(c,o);case ua:{const f=n([],o);for(const p of c)f.push(s(p));return f}case jc:{const f=n({},o);for(const[p,m]of c)f[s(p)]=s(m);return f}case Im:return n(new Date(c),o);case Pm:{const{source:f,flags:p}=c;return n(new RegExp(f,p),o)}case Mm:{const f=n(new Map,o);for(const[p,m]of c)f.set(s(p),s(m));return f}case _m:{const f=n(new Set,o);for(const p of c)f.add(s(p));return f}case Nb:{const{name:f,message:p}=c;return n(new lx[f](p),o)}case Ab:return n(BigInt(c),o);case"BigInt":return n(Object(BigInt(c)),o);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(new lx[l](c),o)};return s},cx=e=>JI(new Map,e)(0),Ui="",{toString:eP}={},{keys:tP}=Object,ia=e=>{const t=typeof e;if(t!=="object"||!e)return[uu,t];const n=eP.call(e).slice(8,-1);switch(n){case"Array":return[ua,Ui];case"Object":return[jc,Ui];case"Date":return[Im,Ui];case"RegExp":return[Pm,Ui];case"Map":return[Mm,Ui];case"Set":return[_m,Ui];case"DataView":return[ua,n]}return n.includes("Array")?[ua,n]:n.includes("Error")?[Nb,n]:[jc,n]},nc=([e,t])=>e===uu&&(t==="function"||t==="symbol"),nP=(e,t,n,s)=>{const o=(c,f)=>{const p=s.push(c)-1;return n.set(f,p),p},l=c=>{if(n.has(c))return n.get(c);let[f,p]=ia(c);switch(f){case uu:{let h=c;switch(p){case"bigint":f=Ab,h=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);h=null;break;case"undefined":return o([Eb],c)}return o([f,h],c)}case ua:{if(p){let y=c;return p==="DataView"?y=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(y=new Uint8Array(c)),o([p,[...y]],c)}const h=[],g=o([f,h],c);for(const y of c)h.push(l(y));return g}case jc:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const h=[],g=o([f,h],c);for(const y of tP(c))(e||!nc(ia(c[y])))&&h.push([l(y),l(c[y])]);return g}case Im:return o([f,c.toISOString()],c);case Pm:{const{source:h,flags:g}=c;return o([f,{source:h,flags:g}],c)}case Mm:{const h=[],g=o([f,h],c);for(const[y,b]of c)(e||!(nc(ia(y))||nc(ia(b))))&&h.push([l(y),l(b)]);return g}case _m:{const h=[],g=o([f,h],c);for(const y of c)(e||!nc(ia(y)))&&h.push(l(y));return g}}const{message:m}=c;return o([f,{name:p,message:m}],c)};return l},ux=(e,{json:t,lossy:n}={})=>{const s=[];return nP(!(t||n),!!t,new Map,s)(e),s},Ec=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?cx(ux(e,t)):structuredClone(e):(e,t)=>cx(ux(e,t));function rP(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function sP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function iP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rP,s=e.options.footnoteBackLabel||sP,o=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[p]);if(!m)continue;const h=e.all(m),g=String(m.identifier).toUpperCase(),y=po(g.toLowerCase());let b=0;const k=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++b<=w;){k.length>0&&k.push({type:"text",value:" "});let E=typeof n=="string"?n:n(p,b);typeof E=="string"&&(E={type:"text",value:E}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(p,b),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const E=S.children[S.children.length-1];E&&E.type==="text"?E.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else h.push(...k);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(h,!0)};e.patch(m,j),f.push(j)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ec(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
102
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
103
|
+
`}]}}const du=(function(e){if(e==null)return cP;if(typeof e=="function")return fu(e);if(typeof e=="object")return Array.isArray(e)?oP(e):aP(e);if(typeof e=="string")return lP(e);throw new Error("Expected function, string, or object as test")});function oP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=du(e[n]);return fu(s);function s(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function aP(e){const t=e;return fu(n);function n(s){const o=s;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function lP(e){return fu(t);function t(n){return n&&n.type===e}}function fu(e){return t;function t(n,s,o){return!!(uP(n)&&e.call(this,n,typeof s=="number"?s:void 0,o||void 0))}}function cP(){return!0}function uP(e){return e!==null&&typeof e=="object"&&"type"in e}const Rb=[],dP=!0,Cp=!1,fP="skip";function Tb(e,t,n,s){let o;typeof t=="function"&&typeof n!="function"?(s=n,n=t):o=t;const l=du(o),c=s?-1:1;f(e,void 0,[])();function f(p,m,h){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=Rb,k,w,S;if((!t||l(p,m,h[h.length-1]||void 0))&&(b=pP(n(p,h)),b[0]===Cp))return b;if("children"in p&&p.children){const j=p;if(j.children&&b[0]!==fP)for(w=(s?j.children.length:-1)+c,S=h.concat(j);w>-1&&w<j.children.length;){const E=j.children[w];if(k=f(E,w,S)(),k[0]===Cp)return k;w=typeof k[1]=="number"?k[1]:w+c}}return b}}}function pP(e){return Array.isArray(e)?e:typeof e=="number"?[dP,e]:e==null?Rb:[e]}function Lm(e,t,n,s){let o,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,o=n):(l=t,c=n,o=s),Tb(e,l,f,o);function f(p,m){const h=m[m.length-1],g=h?h.children.indexOf(p):void 0;return c(p,g,h)}}const jp={}.hasOwnProperty,mP={};function hP(e,t){const n=t||mP,s=new Map,o=new Map,l=new Map,c={...XI,...n.handlers},f={all:m,applyData:xP,definitionById:s,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:c,one:p,options:n,patch:gP,wrap:vP};return Lm(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const g=h.type==="definition"?s:o,y=String(h.identifier).toUpperCase();g.has(y)||g.set(y,h)}}),f;function p(h,g){const y=h.type,b=f.handlers[y];if(jp.call(f.handlers,y)&&b)return b(f,h,g);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in h){const{children:w,...S}=h,j=Ec(S);return j.children=f.all(h),j}return Ec(h)}return(f.options.unknownHandler||yP)(f,h,g)}function m(h){const g=[];if("children"in h){const y=h.children;let b=-1;for(;++b<y.length;){const k=f.one(y[b],h);if(k){if(b&&y[b-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=dx(k.value)),!Array.isArray(k)&&k.type==="element")){const w=k.children[0];w&&w.type==="text"&&(w.value=dx(w.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}return g}}function gP(e,t){e.position&&(t.position=sR(e))}function xP(e,t){let n=t;if(e&&e.data){const s=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const c="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:c}}n.type==="element"&&l&&Object.assign(n.properties,Ec(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function yP(e,t){const n=t.data||{},s="value"in t&&!(jp.call(n,"hProperties")||jp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function vP(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
|
|
104
|
+
`});++s<e.length;)s&&n.push({type:"text",value:`
|
|
105
|
+
`}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
106
|
+
`}),n}function dx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function fx(e,t){const n=hP(e,t),s=n.one(e,void 0),o=iP(n),l=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
|
|
107
|
+
`},o),l}function bP(e,t){return e&&"run"in e?async function(n,s){const o=fx(n,{file:s,...t});await e.run(o,s)}:function(n,s){return fx(n,{file:s,...e||t})}}function px(e){if(e)throw e}var Af,mx;function wP(){if(mx)return Af;mx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},l=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var h=e.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!h&&!g)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},c=function(m,h){n&&h.name==="__proto__"?n(m,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):m[h.name]=h.newValue},f=function(m,h){if(h==="__proto__")if(e.call(m,h)){if(s)return s(m,h).value}else return;return m[h]};return Af=function p(){var m,h,g,y,b,k,w=arguments[0],S=1,j=arguments.length,E=!1;for(typeof w=="boolean"&&(E=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<j;++S)if(m=arguments[S],m!=null)for(h in m)g=f(w,h),y=f(m,h),w!==y&&(E&&y&&(l(y)||(b=o(y)))?(b?(b=!1,k=g&&o(g)?g:[]):k=g&&l(g)?g:{},c(w,{name:h,newValue:p(E,k,y)})):typeof y<"u"&&c(w,{name:h,newValue:y}));return w},Af}var kP=wP();const Rf=ja(kP);function Ep(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function SP(){const e=[],t={run:n,use:s};return t;function n(...o){let l=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(p,...m){const h=e[++l];let g=-1;if(p){c(p);return}for(;++g<o.length;)(m[g]===null||m[g]===void 0)&&(m[g]=o[g]);o=m,h?CP(h,f)(...m):c(null,...m)}}function s(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function CP(e,t){let n;return s;function s(...c){const f=e.length>c.length;let p;f&&c.push(o);try{p=e.apply(this,c)}catch(m){const h=m;if(f&&n)throw h;return o(h)}f||(p&&p.then&&typeof p.then=="function"?p.then(l,o):p instanceof Error?o(p):l(p))}function o(c,...f){n||(n=!0,t(c,...f))}function l(c){o(null,c)}}const Sr={basename:jP,dirname:EP,extname:NP,join:AP,sep:"/"};function jP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_a(e);let n=0,s=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else s<0&&(l=!0,s=o+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let c=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else c<0&&(l=!0,c=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(s=o):(f=-1,s=c));return n===s?s=c:s<0&&(s=e.length),e.slice(n,s)}function EP(e){if(_a(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function NP(e){_a(e);let t=e.length,n=-1,s=0,o=-1,l=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){s=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===s+1?"":e.slice(o,n)}function AP(...e){let t=-1,n;for(;++t<e.length;)_a(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":RP(n)}function RP(e){_a(e);const t=e.codePointAt(0)===47;let n=TP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function TP(e,t){let n="",s=0,o=-1,l=0,c=-1,f,p;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||l===1))if(o!==c-1&&l===2){if(n.length<2||s!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",s=0):(n=n.slice(0,p),s=n.length-1-n.lastIndexOf("/")),o=c,l=0;continue}}else if(n.length>0){n="",s=0,o=c,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(o+1,c):n=e.slice(o+1,c),s=c-o-1;o=c,l=0}else f===46&&l>-1?l++:l=-1}return n}function _a(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IP={cwd:PP};function PP(){return"/"}function Np(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function MP(e){if(typeof e=="string")e=new URL(e);else if(!Np(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return _P(e)}function _P(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Tf=["history","path","basename","stem","extname","dirname"];class Ib{constructor(t){let n;t?Np(t)?n={path:t}:typeof t=="string"||LP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":IP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Tf.length;){const l=Tf[s];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)Tf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Sr.basename(this.path):void 0}set basename(t){Pf(t,"basename"),If(t,"basename"),this.path=Sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Sr.dirname(this.path):void 0}set dirname(t){hx(this.basename,"dirname"),this.path=Sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Sr.extname(this.path):void 0}set extname(t){if(If(t,"extname"),hx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Np(t)&&(t=MP(t)),Pf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Sr.basename(this.path,this.extname):void 0}set stem(t){Pf(t,"stem"),If(t,"stem"),this.path=Sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const o=this.message(t,n,s);throw o.fatal=!0,o}info(t,n,s){const o=this.message(t,n,s);return o.fatal=void 0,o}message(t,n,s){const o=new un(t,n,s);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function If(e,t){if(e&&e.includes(Sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sr.sep+"`")}function Pf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function LP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FP=(function(e){const s=this.constructor.prototype,o=s[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,s),l}),OP={}.hasOwnProperty;class Fm extends FP{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=SP()}copy(){const t=new Fm;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(Rf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Lf("data",this.frozen),this.namespace[t]=n,this):OP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const o=n.call(t,...s);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=rc(t),s=this.parser||this.Parser;return Mf("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),Mf("process",this.parser||this.Parser),_f("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,c){const f=rc(t),p=s.parse(f);s.run(p,f,function(h,g,y){if(h||!g||!y)return m(h);const b=g,k=s.stringify(b,y);$P(k)?y.value=k:y.result=k,m(h,y)});function m(h,g){h||!g?c(h):l?l(g):n(void 0,g)}}}processSync(t){let n=!1,s;return this.freeze(),Mf("processSync",this.parser||this.Parser),_f("processSync",this.compiler||this.Compiler),this.process(t,o),xx("processSync","process",n),s;function o(l,c){n=!0,px(l),s=c}}run(t,n,s){gx(t),this.freeze();const o=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?l(void 0,s):new Promise(l);function l(c,f){const p=rc(n);o.run(t,p,m);function m(h,g,y){const b=g||t;h?f(h):c?c(b):s(void 0,b,y)}}}runSync(t,n){let s=!1,o;return this.run(t,n,l),xx("runSync","run",s),o;function l(c,f){px(c),o=f,s=!0}}stringify(t,n){this.freeze();const s=rc(n),o=this.compiler||this.Compiler;return _f("stringify",o),gx(t),o(t,s)}use(t,...n){const s=this.attachers,o=this.namespace;if(Lf("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[h,...g]=m;p(h,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new 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");f(m.plugins),m.settings&&(o.settings=Rf(!0,o.settings,m.settings))}function f(m){let h=-1;if(m!=null)if(Array.isArray(m))for(;++h<m.length;){const g=m[h];l(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,h){let g=-1,y=-1;for(;++g<s.length;)if(s[g][0]===m){y=g;break}if(y===-1)s.push([m,...h]);else if(h.length>0){let[b,...k]=h;const w=s[y][1];Ep(w)&&Ep(b)&&(b=Rf(!0,w,b)),s[y]=[m,b,...k]}}}}const DP=new Fm().freeze();function Mf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function _f(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gx(e){if(!Ep(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rc(e){return zP(e)?e:new Ib(e)}function zP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $P(e){return typeof e=="string"||HP(e)}function HP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",yx=[],vx={allowDangerousHtml:!0},VP=/^(https?|ircs?|mailto|xmpp)$/i,UP=[{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 Nc(e){const t=ZP(e),n=WP(e);return qP(t.runSync(t.parse(n),n),e)}function ZP(e){const t=e.rehypePlugins||yx,n=e.remarkPlugins||yx,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vx}:vx;return DP().use(EI).use(n).use(bP,s).use(t)}function WP(e){const t=e.children||"",n=new Ib;return typeof t=="string"&&(n.value=t),n}function qP(e,t){const n=t.allowedElements,s=t.allowElement,o=t.components,l=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,p=t.urlTransform||GP;for(const h of UP)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+BP+h.id,void 0);return Lm(e,m),cR(e,{Fragment:a.Fragment,components:o,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function m(h,g,y){if(h.type==="raw"&&y&&typeof g=="number")return c?y.children.splice(g,1):y.children[g]={type:"text",value:h.value},g;if(h.type==="element"){let b;for(b in jf)if(Object.hasOwn(jf,b)&&Object.hasOwn(h.properties,b)){const k=h.properties[b],w=jf[b];(w===null||w.includes(h.tagName))&&(h.properties[b]=p(String(k||""),b,h))}}if(h.type==="element"){let b=n?!n.includes(h.tagName):l?l.includes(h.tagName):!1;if(!b&&s&&typeof g=="number"&&(b=!s(h,g,y)),b&&y&&typeof g=="number")return f&&h.children?y.children.splice(g,1,...h.children):y.children.splice(g,1),g}}}function GP(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||s!==-1&&t>s||VP.test(e.slice(0,t))?e:""}function bx(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,o=n.indexOf(t);for(;o!==-1;)s++,o=n.indexOf(t,o+t.length);return s}function KP(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function QP(e,t,n){const o=du((n||{}).ignore||[]),l=YP(t);let c=-1;for(;++c<l.length;)Tb(e,"text",f);function f(m,h){let g=-1,y;for(;++g<h.length;){const b=h[g],k=y?y.children:void 0;if(o(b,k?k.indexOf(b):void 0,y))return;y=b}if(y)return p(m,h)}function p(m,h){const g=h[h.length-1],y=l[c][0],b=l[c][1];let k=0;const S=g.children.indexOf(m);let j=!1,E=[];y.lastIndex=0;let N=y.exec(m.value);for(;N;){const M=N.index,_={index:N.index,input:N.input,stack:[...h,m]};let R=b(...N,_);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?y.lastIndex=M+1:(k!==M&&E.push({type:"text",value:m.value.slice(k,M)}),Array.isArray(R)?E.push(...R):R&&E.push(R),k=M+N[0].length,j=!0),!y.global)break;N=y.exec(m.value)}return j?(k<m.value.length&&E.push({type:"text",value:m.value.slice(k)}),g.children.splice(S,1,...E)):E=[m],S+E.length}}function YP(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<n.length;){const o=n[s];t.push([XP(o[0]),JP(o[1])])}return t}function XP(e){return typeof e=="string"?new RegExp(KP(e),"g"):e}function JP(e){return typeof e=="function"?e:function(){return e}}const Ff="phrasing",Of=["autolink","link","image","label"];function eM(){return{transforms:[aM],enter:{literalAutolink:nM,literalAutolinkEmail:Df,literalAutolinkHttp:Df,literalAutolinkWww:Df},exit:{literalAutolink:oM,literalAutolinkEmail:iM,literalAutolinkHttp:rM,literalAutolinkWww:sM}}}function tM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ff,notInConstruct:Of},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ff,notInConstruct:Of},{character:":",before:"[ps]",after:"\\/",inConstruct:Ff,notInConstruct:Of}]}}function nM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Df(e){this.config.enter.autolinkProtocol.call(this,e)}function rM(e){this.config.exit.autolinkProtocol.call(this,e)}function sM(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function iM(e){this.config.exit.autolinkEmail.call(this,e)}function oM(e){this.exit(e)}function aM(e){QP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,lM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),cM]],{ignore:["link","linkReference"]})}function lM(e,t,n,s,o){let l="";if(!Pb(o)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!uM(n)))return!1;const c=dM(n+s);if(!c[0])return!1;const f={type:"link",title:null,url:l+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function cM(e,t,n,s){return!Pb(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uM(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function dM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],s=n.indexOf(")");const o=bx(e,"(");let l=bx(e,")");for(;s!==-1&&o>l;)e+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),l++;return[e,n]}function Pb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ci(n)||lu(n))&&(!t||n!==47)}Mb.peek=bM;function fM(){this.buffer()}function pM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mM(){this.buffer()}function hM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xM(e){this.exit(e)}function yM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vM(e){this.exit(e)}function bM(){return"["}function Mb(e,t,n,s){const o=n.createTracker(s);let l=o.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return l+=o.move(n.safe(n.associationId(e),{after:"]",before:l})),f(),c(),l+=o.move("]"),l}function wM(){return{enter:{gfmFootnoteCallString:fM,gfmFootnoteCall:pM,gfmFootnoteDefinitionLabelString:mM,gfmFootnoteDefinition:hM},exit:{gfmFootnoteCallString:gM,gfmFootnoteCall:xM,gfmFootnoteDefinitionLabelString:yM,gfmFootnoteDefinition:vM}}}function kM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Mb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(s,o,l,c){const f=l.createTracker(c);let p=f.move("[^");const m=l.enter("footnoteDefinition"),h=l.enter("label");return p+=f.move(l.safe(l.associationId(s),{before:p,after:"]"})),h(),p+=f.move("]:"),s.children&&s.children.length>0&&(f.shift(4),p+=f.move((t?`
|
|
108
|
+
`:" ")+l.indentLines(l.containerFlow(s,f.current()),t?_b:SM))),m(),p}}function SM(e,t,n){return t===0?e:_b(e,t,n)}function _b(e,t,n){return(n?"":" ")+e}const CM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Lb.peek=RM;function jM(){return{canContainEols:["delete"],enter:{strikethrough:NM},exit:{strikethrough:AM}}}function EM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CM}],handlers:{delete:Lb}}}function NM(e){this.enter({type:"delete",children:[]},e)}function AM(e){this.exit(e)}function Lb(e,t,n,s){const o=n.createTracker(s),l=n.enter("strikethrough");let c=o.move("~~");return c+=n.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),l(),c}function RM(){return"~"}function TM(e){return e.length}function IM(e,t){const n=t||{},s=(n.align||[]).concat(),o=n.stringLength||TM,l=[],c=[],f=[],p=[];let m=0,h=-1;for(;++h<e.length;){const w=[],S=[];let j=-1;for(e[h].length>m&&(m=e[h].length);++j<e[h].length;){const E=PM(e[h][j]);if(n.alignDelimiters!==!1){const N=o(E);S[j]=N,(p[j]===void 0||N>p[j])&&(p[j]=N)}w.push(E)}c[h]=w,f[h]=S}let g=-1;if(typeof s=="object"&&"length"in s)for(;++g<m;)l[g]=wx(s[g]);else{const w=wx(s);for(;++g<m;)l[g]=w}g=-1;const y=[],b=[];for(;++g<m;){const w=l[g];let S="",j="";w===99?(S=":",j=":"):w===108?S=":":w===114&&(j=":");let E=n.alignDelimiters===!1?1:Math.max(1,p[g]-S.length-j.length);const N=S+"-".repeat(E)+j;n.alignDelimiters!==!1&&(E=S.length+E+j.length,E>p[g]&&(p[g]=E),b[g]=E),y[g]=N}c.splice(1,0,y),f.splice(1,0,b),h=-1;const k=[];for(;++h<c.length;){const w=c[h],S=f[h];g=-1;const j=[];for(;++g<m;){const E=w[g]||"";let N="",M="";if(n.alignDelimiters!==!1){const _=p[g]-(S[g]||0),R=l[g];R===114?N=" ".repeat(_):R===99?_%2?(N=" ".repeat(_/2+.5),M=" ".repeat(_/2-.5)):(N=" ".repeat(_/2),M=N):M=" ".repeat(_)}n.delimiterStart!==!1&&!g&&j.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||g)&&j.push(" "),n.alignDelimiters!==!1&&j.push(N),j.push(E),n.alignDelimiters!==!1&&j.push(M),n.padding!==!1&&j.push(" "),(n.delimiterEnd!==!1||g!==m-1)&&j.push("|")}k.push(n.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return k.join(`
|
|
109
|
+
`)}function PM(e){return e==null?"":String(e)}function wx(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function MM(e,t,n,s){const o=n.enter("blockquote"),l=n.createTracker(s);l.move("> "),l.shift(2);const c=n.indentLines(n.containerFlow(e,l.current()),_M);return o(),c}function _M(e,t,n){return">"+(n?"":" ")+e}function LM(e,t){return kx(e,t.inConstruct,!0)&&!kx(e,t.notInConstruct,!1)}function kx(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function Sx(e,t,n,s){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
110
|
+
`&&LM(n.stack,n.unsafe[o]))return/[ \t]/.test(s.before)?"":" ";return`\\
|
|
111
|
+
`}function FM(e,t){const n=String(e);let s=n.indexOf(t),o=s,l=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===o?++l>c&&(c=l):l=1,o=s+t.length,s=n.indexOf(t,o);return c}function OM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function DM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function zM(e,t,n,s){const o=DM(n),l=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(OM(e,n)){const g=n.enter("codeIndented"),y=n.indentLines(l,$M);return g(),y}const f=n.createTracker(s),p=o.repeat(Math.max(FM(l,o)+1,3)),m=n.enter("codeFenced");let h=f.move(p);if(e.lang){const g=n.enter(`codeFencedLang${c}`);h+=f.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);h+=f.move(" "),h+=f.move(n.safe(e.meta,{before:h,after:`
|
|
112
|
+
`,encode:["`"],...f.current()})),g()}return h+=f.move(`
|
|
113
|
+
`),l&&(h+=f.move(l+`
|
|
114
|
+
`)),h+=f.move(p),m(),h}function $M(e,t,n){return(n?"":" ")+e}function Om(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function HM(e,t,n,s){const o=Om(n),l=o==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const p=n.createTracker(s);let m=p.move("[");return m+=p.move(n.safe(n.associationId(e),{before:m,after:"]",...p.current()})),m+=p.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(n.safe(e.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(f=n.enter("destinationRaw"),m+=p.move(n.safe(e.url,{before:m,after:e.title?" ":`
|
|
115
|
+
`,...p.current()}))),f(),e.title&&(f=n.enter(`title${l}`),m+=p.move(" "+o),m+=p.move(n.safe(e.title,{before:m,after:o,...p.current()})),m+=p.move(o),f()),c(),m}function BM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ca(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ac(e,t,n){const s=ro(e),o=ro(t);return s===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Fb.peek=VM;function Fb(e,t,n,s){const o=BM(n),l=n.enter("emphasis"),c=n.createTracker(s),f=c.move(o);let p=c.move(n.containerPhrasing(e,{after:o,before:f,...c.current()}));const m=p.charCodeAt(0),h=Ac(s.before.charCodeAt(s.before.length-1),m,o);h.inside&&(p=Ca(m)+p.slice(1));const g=p.charCodeAt(p.length-1),y=Ac(s.after.charCodeAt(0),g,o);y.inside&&(p=p.slice(0,-1)+Ca(g));const b=c.move(o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:h.outside},f+p+b}function VM(e,t,n){return n.options.emphasis||"*"}function UM(e,t){let n=!1;return Lm(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,Cp}),!!((!e.depth||e.depth<3)&&Am(e)&&(t.options.setext||n))}function ZM(e,t,n,s){const o=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(s);if(UM(e,n)){const h=n.enter("headingSetext"),g=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
|
|
116
|
+
`,after:`
|
|
117
|
+
`});return g(),h(),y+`
|
|
118
|
+
`+(o===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
119
|
+
`))+1))}const c="#".repeat(o),f=n.enter("headingAtx"),p=n.enter("phrasing");l.move(c+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
120
|
+
`,...l.current()});return/^[\t ]/.test(m)&&(m=Ca(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,n.options.closeAtx&&(m+=" "+c),p(),f(),m}Ob.peek=WM;function Ob(e){return e.value||""}function WM(){return"<"}Db.peek=qM;function Db(e,t,n,s){const o=Om(n),l=o==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const p=n.createTracker(s);let m=p.move("![");return m+=p.move(n.safe(e.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(n.safe(e.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(f=n.enter("destinationRaw"),m+=p.move(n.safe(e.url,{before:m,after:e.title?" ":")",...p.current()}))),f(),e.title&&(f=n.enter(`title${l}`),m+=p.move(" "+o),m+=p.move(n.safe(e.title,{before:m,after:o,...p.current()})),m+=p.move(o),f()),m+=p.move(")"),c(),m}function qM(){return"!"}zb.peek=GM;function zb(e,t,n,s){const o=e.referenceType,l=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(s);let p=f.move("![");const m=n.safe(e.alt,{before:p,after:"]",...f.current()});p+=f.move(m+"]["),c();const h=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:p,after:"]",...f.current()});return c(),n.stack=h,l(),o==="full"||!m||m!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function GM(){return"!"}$b.peek=KM;function $b(e,t,n){let s=e.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(s);)o+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++l<n.unsafe.length;){const c=n.unsafe[l],f=n.compilePattern(c);let p;if(c.atBreak)for(;p=f.exec(s);){let m=p.index;s.charCodeAt(m)===10&&s.charCodeAt(m-1)===13&&m--,s=s.slice(0,m)+" "+s.slice(p.index+1)}}return o+s+o}function KM(){return"`"}function Hb(e,t){const n=Am(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Bb.peek=QM;function Bb(e,t,n,s){const o=Om(n),l=o==='"'?"Quote":"Apostrophe",c=n.createTracker(s);let f,p;if(Hb(e,n)){const h=n.stack;n.stack=[],f=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),n.stack=h,g}f=n.enter("link"),p=n.enter("label");let m=c.move("[");return m+=c.move(n.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=n.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(n.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=n.enter("destinationRaw"),m+=c.move(n.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=n.enter(`title${l}`),m+=c.move(" "+o),m+=c.move(n.safe(e.title,{before:m,after:o,...c.current()})),m+=c.move(o),p()),m+=c.move(")"),f(),m}function QM(e,t,n){return Hb(e,n)?"<":"["}Vb.peek=YM;function Vb(e,t,n,s){const o=e.referenceType,l=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(s);let p=f.move("[");const m=n.containerPhrasing(e,{before:p,after:"]",...f.current()});p+=f.move(m+"]["),c();const h=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:p,after:"]",...f.current()});return c(),n.stack=h,l(),o==="full"||!m||m!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function YM(){return"["}function Dm(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function XM(e){const t=Dm(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function JM(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ub(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function e_(e,t,n,s){const o=n.enter("list"),l=n.bulletCurrent;let c=e.ordered?JM(n):Dm(n);const f=e.ordered?c==="."?")":".":XM(n);let p=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(p=!0),Ub(n)===c&&h){let g=-1;for(;++g<e.children.length;){const y=e.children[g];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=f),n.bulletCurrent=c;const m=n.containerFlow(e,s);return n.bulletLastUsed=c,n.bulletCurrent=l,o(),m}function t_(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function n_(e,t,n,s){const o=t_(n);let l=n.bulletCurrent||Dm(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let c=l.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(s);f.move(l+" ".repeat(c-l.length)),f.shift(c);const p=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),h);return p(),m;function h(g,y,b){return y?(b?"":" ".repeat(c))+g:(b?l:l+" ".repeat(c-l.length))+g}}function r_(e,t,n,s){const o=n.enter("paragraph"),l=n.enter("phrasing"),c=n.containerPhrasing(e,s);return l(),o(),c}const s_=du(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function i_(e,t,n,s){return(e.children.some(function(c){return s_(c)})?n.containerPhrasing:n.containerFlow).call(n,e,s)}function o_(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Zb.peek=a_;function Zb(e,t,n,s){const o=o_(n),l=n.enter("strong"),c=n.createTracker(s),f=c.move(o+o);let p=c.move(n.containerPhrasing(e,{after:o,before:f,...c.current()}));const m=p.charCodeAt(0),h=Ac(s.before.charCodeAt(s.before.length-1),m,o);h.inside&&(p=Ca(m)+p.slice(1));const g=p.charCodeAt(p.length-1),y=Ac(s.after.charCodeAt(0),g,o);y.inside&&(p=p.slice(0,-1)+Ca(g));const b=c.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:h.outside},f+p+b}function a_(e,t,n){return n.options.strong||"*"}function l_(e,t,n,s){return n.safe(e.value,s)}function c_(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function u_(e,t,n){const s=(Ub(n)+(n.options.ruleSpaces?" ":"")).repeat(c_(n));return n.options.ruleSpaces?s.slice(0,-1):s}const Wb={blockquote:MM,break:Sx,code:zM,definition:HM,emphasis:Fb,hardBreak:Sx,heading:ZM,html:Ob,image:Db,imageReference:zb,inlineCode:$b,link:Bb,linkReference:Vb,list:e_,listItem:n_,paragraph:r_,root:i_,strong:Zb,text:l_,thematicBreak:u_};function d_(){return{enter:{table:f_,tableData:Cx,tableHeader:Cx,tableRow:m_},exit:{codeText:h_,table:p_,tableData:zf,tableHeader:zf,tableRow:zf}}}function f_(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function p_(e){this.exit(e),this.data.inTable=void 0}function m_(e){this.enter({type:"tableRow",children:[]},e)}function zf(e){this.exit(e)}function Cx(e){this.enter({type:"tableCell",children:[]},e)}function h_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,g_));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function g_(e,t){return t==="|"?t:e}function x_(e){const t=e||{},n=t.tableCellPadding,s=t.tablePipeAlign,o=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
121
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:p,tableRow:f}};function c(b,k,w,S){return m(h(b,w,S),b.align)}function f(b,k,w,S){const j=g(b,w,S),E=m([j]);return E.slice(0,E.indexOf(`
|
|
122
|
+
`))}function p(b,k,w,S){const j=w.enter("tableCell"),E=w.enter("phrasing"),N=w.containerPhrasing(b,{...S,before:l,after:l});return E(),j(),N}function m(b,k){return IM(b,{align:k,alignDelimiters:s,padding:n,stringLength:o})}function h(b,k,w){const S=b.children;let j=-1;const E=[],N=k.enter("table");for(;++j<S.length;)E[j]=g(S[j],k,w);return N(),E}function g(b,k,w){const S=b.children;let j=-1;const E=[],N=k.enter("tableRow");for(;++j<S.length;)E[j]=p(S[j],b,k,w);return N(),E}function y(b,k,w){let S=Wb.inlineCode(b,k,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function y_(){return{exit:{taskListCheckValueChecked:jx,taskListCheckValueUnchecked:jx,paragraph:b_}}}function v_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:w_}}}function jx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b_(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const s=n.children[0];if(s&&s.type==="text"){const o=t.children;let l=-1,c;for(;++l<o.length;){const f=o[l];if(f.type==="paragraph"){c=f;break}}c===n&&(s.value=s.value.slice(1),s.value.length===0?n.children.shift():n.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,n.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function w_(e,t,n,s){const o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(s);l&&f.move(c);let p=Wb.listItem(e,t,n,{...s,...f.current()});return l&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(h){return h+c}}function k_(){return[eM(),wM(),jM(),d_(),y_()]}function S_(e){return{extensions:[tM(),kM(e),EM(),x_(e),v_()]}}const C_={tokenize:T_,partial:!0},qb={tokenize:I_,partial:!0},Gb={tokenize:P_,partial:!0},Kb={tokenize:M_,partial:!0},j_={tokenize:__,partial:!0},Qb={name:"wwwAutolink",tokenize:A_,previous:Xb},Yb={name:"protocolAutolink",tokenize:R_,previous:Jb},ns={name:"emailAutolink",tokenize:N_,previous:e4},Lr={};function E_(){return{text:Lr}}let Js=48;for(;Js<123;)Lr[Js]=ns,Js++,Js===58?Js=65:Js===91&&(Js=97);Lr[43]=ns;Lr[45]=ns;Lr[46]=ns;Lr[95]=ns;Lr[72]=[ns,Yb];Lr[104]=[ns,Yb];Lr[87]=[ns,Qb];Lr[119]=[ns,Qb];function N_(e,t,n){const s=this;let o,l;return c;function c(g){return!Ap(g)||!e4.call(s,s.previous)||zm(s.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Ap(g)?(e.consume(g),f):g===64?(e.consume(g),p):n(g)}function p(g){return g===46?e.check(j_,h,m)(g):g===45||g===95||ln(g)?(l=!0,e.consume(g),p):h(g)}function m(g){return e.consume(g),o=!0,p}function h(g){return l&&o&&mn(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function A_(e,t,n){const s=this;return o;function o(c){return c!==87&&c!==119||!Xb.call(s,s.previous)||zm(s.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(C_,e.attempt(qb,e.attempt(Gb,l),n),n)(c))}function l(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function R_(e,t,n){const s=this;let o="",l=!1;return c;function c(g){return(g===72||g===104)&&Jb.call(s,s.previous)&&!zm(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(mn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const y=o.toLowerCase();if(y==="http"||y==="https")return e.consume(g),p}return n(g)}function p(g){return g===47?(e.consume(g),l?m:(l=!0,p)):n(g)}function m(g){return g===null||Cc(g)||yt(g)||ci(g)||lu(g)?n(g):e.attempt(qb,e.attempt(Gb,h),n)(g)}function h(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function T_(e,t,n){let s=0;return o;function o(c){return(c===87||c===119)&&s<3?(s++,e.consume(c),o):c===46&&s===3?(e.consume(c),l):n(c)}function l(c){return c===null?n(c):t(c)}}function I_(e,t,n){let s,o,l;return c;function c(m){return m===46||m===95?e.check(Kb,p,f)(m):m===null||yt(m)||ci(m)||m!==45&&lu(m)?p(m):(l=!0,e.consume(m),c)}function f(m){return m===95?s=!0:(o=s,s=void 0),e.consume(m),c}function p(m){return o||s||!l?n(m):t(m)}}function P_(e,t){let n=0,s=0;return o;function o(c){return c===40?(n++,e.consume(c),o):c===41&&s<n?l(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(Kb,t,l)(c):c===null||yt(c)||ci(c)?t(c):(e.consume(c),o)}function l(c){return c===41&&s++,e.consume(c),o}}function M_(e,t,n){return s;function s(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),s):f===38?(e.consume(f),l):f===93?(e.consume(f),o):f===60||f===null||yt(f)||ci(f)?t(f):n(f)}function o(f){return f===null||f===40||f===91||yt(f)||ci(f)?t(f):s(f)}function l(f){return mn(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),s):mn(f)?(e.consume(f),c):n(f)}}function __(e,t,n){return s;function s(l){return e.consume(l),o}function o(l){return ln(l)?n(l):t(l)}}function Xb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function Jb(e){return!mn(e)}function e4(e){return!(e===47||Ap(e))}function Ap(e){return e===43||e===45||e===46||e===95||ln(e)}function zm(e){let t=e.length,n=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){n=!0;break}if(s._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const L_={tokenize:V_,partial:!0};function F_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$_,continuation:{tokenize:H_},exit:B_}},text:{91:{name:"gfmFootnoteCall",tokenize:z_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:O_,resolveTo:D_}}}}function O_(e,t,n){const s=this;let o=s.events.length;const l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let c;for(;o--;){const p=s.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!c||!c._balanced)return n(p);const m=hr(s.sliceSerialize({start:c.end,end:s.now()}));return m.codePointAt(0)!==94||!l.includes(m.slice(1))?n(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),t(p))}}function D_(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},f=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",c,t],["exit",c,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...f),e}function z_(e,t,n){const s=this,o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let l=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(g){if(l>999||g===93&&!c||g===null||g===91||yt(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return o.includes(hr(s.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return yt(g)||(c=!0),l++,e.consume(g),g===92?h:m}function h(g){return g===91||g===92||g===93?(e.consume(g),l++,m):m(g)}}function $_(e,t,n){const s=this,o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let l,c=0,f;return p;function p(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(k)}function h(k){if(c>999||k===93&&!f||k===null||k===91||yt(k))return n(k);if(k===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return l=hr(s.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return yt(k)||(f=!0),c++,e.consume(k),k===92?g:h}function g(k){return k===91||k===92||k===93?(e.consume(k),c++,h):h(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(l)||o.push(l),st(e,b,"gfmFootnoteDefinitionWhitespace")):n(k)}function b(k){return t(k)}}function H_(e,t,n){return e.check(Ma,t,e.attempt(L_,t,n))}function B_(e){e.exit("gfmFootnoteDefinition")}function V_(e,t,n){const s=this;return st(e,o,"gfmFootnoteDefinitionIndent",5);function o(l){const c=s.events[s.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(l):n(l)}}function U_(e){let n=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function o(c,f){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},y=[["enter",h,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",g,f]],b=f.parser.constructs.insideSpan.null;b&&Hn(y,y.length,0,cu(b,c.slice(m+1,p),f)),Hn(y,y.length,0,[["exit",g,f],["enter",c[p][1],f],["exit",c[p][1],f],["exit",h,f]]),Hn(c,m-1,p-m+3,y),p=m+y.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function l(c,f,p){const m=this.previous,h=this.events;let g=0;return y;function y(k){return m===126&&h[h.length-1][1].type!=="characterEscape"?p(k):(c.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const w=ro(m);if(k===126)return g>1?p(k):(c.consume(k),g++,b);if(g<2&&!n)return p(k);const S=c.exit("strikethroughSequenceTemporary"),j=ro(k);return S._open=!j||j===2&&!!w,S._close=!w||w===2&&!!j,f(k)}}}class Z_{constructor(){this.map=[]}add(t,n,s){W_(this,t,n,s)}consume(t){if(this.map.sort(function(l,c){return l[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const s=[];for(;n>0;)n-=1,s.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];s.push(t.slice()),t.length=0;let o=s.pop();for(;o;){for(const l of o)t.push(l);o=s.pop()}this.map.length=0}}function W_(e,t,n,s){let o=0;if(!(n===0&&s.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...s);return}o+=1}e.map.push([t,n,s])}}function q_(e,t){let n=!1;const s=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=s.length-1;s[l]=s[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return s}function G_(){return{flow:{null:{name:"table",tokenize:K_,resolveAll:Q_}}}}function K_(e,t,n){const s=this;let o=0,l=0,c;return f;function f(D){let B=s.events.length-1;for(;B>-1;){const Q=s.events[B][1].type;if(Q==="lineEnding"||Q==="linePrefix")B--;else break}const W=B>-1?s.events[B][1].type:null,Y=W==="tableHead"||W==="tableRow"?R:p;return Y===R&&s.parser.lazy[s.now().line]?n(D):Y(D)}function p(D){return e.enter("tableHead"),e.enter("tableRow"),m(D)}function m(D){return D===124||(c=!0,l+=1),h(D)}function h(D){return D===null?n(D):$e(D)?l>1?(l=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),b):n(D):Je(D)?st(e,h,"whitespace")(D):(l+=1,c&&(c=!1,o+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,h):(e.enter("data"),g(D)))}function g(D){return D===null||D===124||yt(D)?(e.exit("data"),h(D)):(e.consume(D),D===92?y:g)}function y(D){return D===92||D===124?(e.consume(D),g):g(D)}function b(D){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(D):(e.enter("tableDelimiterRow"),c=!1,Je(D)?st(e,k,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):k(D))}function k(D){return D===45||D===58?S(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),w):_(D)}function w(D){return Je(D)?st(e,S,"whitespace")(D):S(D)}function S(D){return D===58?(l+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),j):D===45?(l+=1,j(D)):D===null||$e(D)?M(D):_(D)}function j(D){return D===45?(e.enter("tableDelimiterFiller"),E(D)):_(D)}function E(D){return D===45?(e.consume(D),E):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(D))}function N(D){return Je(D)?st(e,M,"whitespace")(D):M(D)}function M(D){return D===124?k(D):D===null||$e(D)?!c||o!==l?_(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):_(D)}function _(D){return n(D)}function R(D){return e.enter("tableRow"),P(D)}function P(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),P):D===null||$e(D)?(e.exit("tableRow"),t(D)):Je(D)?st(e,P,"whitespace")(D):(e.enter("data"),L(D))}function L(D){return D===null||D===124||yt(D)?(e.exit("data"),P(D)):(e.consume(D),D===92?G:L)}function G(D){return D===92||D===124?(e.consume(D),L):L(D)}}function Q_(e,t){let n=-1,s=!0,o=0,l=[0,0,0,0],c=[0,0,0,0],f=!1,p=0,m,h,g;const y=new Z_;for(;++n<e.length;){const b=e[n],k=b[1];b[0]==="enter"?k.type==="tableHead"?(f=!1,p!==0&&(Ex(y,t,p,m,h),h=void 0,p=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",m,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(s=!0,g=void 0,l=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,t]])),o=k.type==="tableDelimiterRow"?2:h?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(s=!1,c[2]===0&&(l[1]!==0&&(c[0]=c[1],g=sc(y,t,l,o,void 0,g),l=[0,0,0,0]),c[2]=n)):k.type==="tableCellDivider"&&(s?s=!1:(l[1]!==0&&(c[0]=c[1],g=sc(y,t,l,o,void 0,g)),l=c,c=[l[1],n,0,0])):k.type==="tableHead"?(f=!0,p=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=n,l[1]!==0?(c[0]=c[1],g=sc(y,t,l,o,n,g)):c[1]!==0&&(g=sc(y,t,c,o,n,g)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=n)}for(p!==0&&Ex(y,t,p,m,h),y.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=q_(t.events,n))}return e}function sc(e,t,n,s,o,l){const c=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(l.end=Object.assign({},qi(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const p=qi(t.events,n[1]);if(l={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const m=qi(t.events,n[2]),h=qi(t.events,n[3]),g={type:f,start:Object.assign({},m),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",g,t]]),s!==2){const y=t.events[n[2]],b=t.events[n[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,w=n[3]-n[2]-1;e.add(k,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(l.end=Object.assign({},qi(t.events,o)),e.add(o,0,[["exit",l,t]]),l=void 0),l}function Ex(e,t,n,s,o){const l=[],c=qi(t.events,n);o&&(o.end=Object.assign({},c),l.push(["exit",o,t])),s.end=Object.assign({},c),l.push(["exit",s,t]),e.add(n+1,0,l)}function qi(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const Y_={name:"tasklistCheck",tokenize:J_};function X_(){return{text:{91:Y_}}}function J_(e,t,n){const s=this;return o;function o(p){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),l)}function l(p){return yt(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):n(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(p)}function f(p){return $e(p)?t(p):Je(p)?e.check({tokenize:eL},t,n)(p):n(p)}}function eL(e,t,n){return st(e,s,"whitespace");function s(o){return o===null?n(o):t(o)}}function tL(e){return db([E_(),F_(),U_(e),G_(),X_()])}const nL={};function Rc(e){const t=this,n=e||nL,s=t.data(),o=s.micromarkExtensions||(s.micromarkExtensions=[]),l=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),c=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);o.push(tL(n)),l.push(k_()),c.push(S_(n))}function Nx({data:e,collapsed:t=!1,depth:n=0}){const[s,o]=d.useState(t),[l,c]=d.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2)),c(!0),setTimeout(()=>c(!1),2e3)}catch(m){console.error("Failed to copy:",m)}},p=(m,h)=>{if(m===null)return a.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:"null"});if(m===void 0)return a.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:"undefined"});if(typeof m=="boolean")return a.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:m.toString()});if(typeof m=="number")return a.jsx("span",{className:"text-green-600 dark:text-green-400",children:m});if(typeof m=="string")return a.jsxs("span",{className:"text-emerald-700 dark:text-orange-300",children:['"',m,'"']});if(Array.isArray(m))return m.length===0?a.jsx("span",{className:"text-foreground",children:"[]"}):a.jsxs("span",{className:"inline-block",children:[a.jsx("button",{className:"inline-flex items-center justify-center w-4 h-4 mr-0.5 text-neutral-500 hover:text-black dark:text-neutral-400 dark:hover:text-white transition-colors",onClick:()=>o(!s),"aria-label":s?"Expand array":"Collapse array",children:s?a.jsx(An,{size:12}):a.jsx(cn,{size:12})}),a.jsx("span",{className:"text-foreground",children:"["}),s?a.jsxs("span",{className:"text-neutral-500 dark:text-neutral-400 italic mx-1",children:["...",m.length," items"]}):a.jsx("div",{className:"ml-[18px]",children:m.map((g,y)=>a.jsxs("div",{className:"my-0.5",children:[a.jsxs("span",{className:"text-muted-foreground mr-1",children:[y,":"]}),p(g),y<m.length-1&&a.jsx("span",{className:"text-foreground",children:","})]},y))}),a.jsx("span",{className:"text-foreground",children:"]"})]});if(typeof m=="object"){const g=Object.entries(m);return g.length===0?a.jsx("span",{className:"text-foreground",children:"{}"}):a.jsxs("span",{className:"inline-block",children:[a.jsx("button",{className:"inline-flex items-center justify-center w-4 h-4 mr-0.5 text-neutral-500 hover:text-black dark:text-neutral-400 dark:hover:text-white transition-colors",onClick:()=>o(!s),"aria-label":s?"Expand object":"Collapse object",children:s?a.jsx(An,{size:12}):a.jsx(cn,{size:12})}),a.jsx("span",{className:"text-foreground",children:"{"}),s?a.jsxs("span",{className:"text-neutral-500 dark:text-neutral-400 italic mx-1",children:["...",g.length," properties"]}):a.jsx("div",{className:"ml-[18px]",children:g.map(([y,b],k)=>a.jsxs("div",{className:"my-0.5",children:[a.jsxs("span",{className:"text-blue-700 dark:text-blue-300",children:['"',y,'"']}),a.jsx("span",{className:"text-foreground mx-1",children:":"}),p(b),k<g.length-1&&a.jsx("span",{className:"text-foreground",children:","})]},y))}),a.jsx("span",{className:"text-black dark:text-neutral-300",children:"}"})]})}return a.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:String(m)})};return a.jsxs("div",{className:"relative font-mono text-xs leading-relaxed p-2 bg-neutral-50 dark:bg-neutral-900 rounded overflow-auto",children:[n===0&&a.jsx(Oe,{variant:"ghost",size:"icon",className:"absolute top-1 right-1 h-6 w-6 bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-800 dark:hover:bg-neutral-700",onClick:f,"aria-label":"Copy JSON to clipboard",children:l?a.jsx($n,{size:14}):a.jsx(w2,{size:14})}),p(e)]})}function Ax({toolUse:e,toolResult:t,toolResults:n={},workingDirectory:s,childrenMessages:o={},expandedTasks:l=new Set,onToggleTaskExpanded:c,questionId:f,onAnswerQuestion:p}){return a.jsxs(a.Fragment,{children:[a.jsx(Tv,{toolName:e.name,toolInput:e.input,workingDirectory:s}),a.jsx(n4,{toolName:e.name,toolInput:e.input,toolResult:t,workingDirectory:s,toolUseId:e.id,childrenMessages:o,toolResults:n,questionId:f,onAnswerQuestion:p})]})}function rL(e){switch(e){case"Read":return a.jsx(eo,{size:15});case"Edit":case"MultiEdit":return a.jsx(nm,{size:15});case"Bash":return a.jsx(Qc,{size:15});case"Grep":case"Glob":return a.jsx(ii,{size:15});case"LS":return a.jsx(qc,{size:15});case"TodoRead":case"TodoWrite":return a.jsx(j2,{size:15});case"WebSearch":return a.jsx(Jp,{size:15});case"WebFetch":return a.jsx(ga,{size:15});case"Task":return a.jsx(em,{size:15});case"exit_plan_mode":return a.jsx(zC,{size:15});case"Write":return a.jsx(Xp,{size:15});default:return a.jsx(tm,{size:15})}}function sL(e){const t=[],n=/`?★\s*Insight\s*─+`?\s*([\s\S]*?)\s*`?─{5,}`?/g;let s=0,o;for(;(o=n.exec(e))!==null;){if(o.index>s){const l=e.slice(s,o.index).trim();l&&t.push({type:"text",content:l})}t.push({type:"insight",content:o[1].trim()}),s=o.index+o[0].length}if(s<e.length){const l=e.slice(s).trim();l&&t.push({type:"text",content:l})}return t.length===0&&t.push({type:"text",content:e}),t}function Rx({text:e,markdownComponents:t}){const n=sL(e);return a.jsx("div",{className:"my-1",children:a.jsxs("div",{className:"border border-zinc-500/20 rounded-lg overflow-hidden bg-zinc-500/5",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-zinc-500/10",children:[a.jsx(k2,{size:14,className:"text-zinc-400 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-400",children:"Response"})]}),a.jsx("div",{className:"px-3 py-2 prose prose-sm max-w-none dark:prose-invert",children:n.map((s,o)=>s.type==="insight"?a.jsx("div",{className:"my-3 not-prose",children:a.jsxs("div",{className:"border border-yellow-500/30 rounded-lg overflow-hidden bg-yellow-500/5",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border-b border-yellow-500/20",children:[a.jsx(ya,{size:12,className:"text-yellow-400 flex-shrink-0"}),a.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-yellow-400",children:"Insight"})]}),a.jsx("div",{className:"px-3 py-2 prose prose-sm max-w-none dark:prose-invert",children:a.jsx(Nc,{remarkPlugins:[Rc],components:t,children:s.content})})]})},o):a.jsx(Nc,{remarkPlugins:[Rc],components:t,children:s.content},o))})]})})}const $f={table({children:e}){return a.jsx("div",{className:"my-3 not-prose",children:a.jsx("div",{className:"border border-zinc-500/30 rounded-lg overflow-hidden bg-zinc-500/5",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsx("table",{className:"w-full text-sm",children:e})})})})},thead({children:e}){return a.jsx("thead",{className:"bg-zinc-500/10 border-b border-zinc-500/20",children:e})},tbody({children:e}){return a.jsx("tbody",{className:"divide-y divide-zinc-500/10",children:e})},tr({children:e}){return a.jsx("tr",{className:"hover:bg-zinc-500/5 transition-colors",children:e})},th({children:e}){return a.jsx("th",{className:"px-3 py-2 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400",children:e})},td({children:e}){return a.jsx("td",{className:"px-3 py-2 text-foreground",children:e})},code({node:e,inline:t,className:n,children:s,...o}){const l=/language-(\w+)/.exec(n||""),c=l?l[1]:"text";return!t&&l?a.jsx(ou,{code:String(s).replace(/\n$/,""),language:c,className:"bg-neutral-900 rounded-md overflow-hidden max-w-full box-border"}):a.jsx("code",{className:n,...o,children:s})}};function t4({message:e,toolResults:t={},childrenMessages:n={},expandedTasks:s=new Set,onToggleTaskExpanded:o,isFirstInGroup:l=!0,isLastInGroup:c=!0,isStreaming:f=!1,currentQuestionRequest:p,onAnswerQuestion:m}){const[h,g]=d.useState(new Set),[y,b]=d.useState(!1);if(e.type==="user"){const w=(typeof e.content=="string"?e.content:Array.isArray(e.content)?e.content.filter(M=>M.type==="text").map(M=>M.text).join(`
|
|
123
|
+
`):"").split(`
|
|
124
|
+
`),S=w.length>8,j=y?w:w.slice(0,8),E=w.length-8,N=j.join(`
|
|
125
|
+
`);return a.jsx("div",{className:"flex justify-end w-full my-1",children:a.jsxs("div",{className:"relative bg-card text-card-foreground border border-border rounded-xl p-3 max-w-[80%] min-w-[100px]",children:[S&&a.jsx("button",{onClick:()=>b(!y),className:"absolute top-2 right-2 w-6 h-6 border-none bg-transparent text-neutral-600 cursor-pointer flex items-center justify-center p-0 z-10 hover:text-neutral-900","aria-label":y?"Show fewer lines":"Show all lines",children:y?a.jsx(Kc,{size:16}):a.jsx(Gc,{size:16})}),a.jsxs("div",{className:"text-sm leading-relaxed text-foreground whitespace-pre-wrap break-words",children:[N,!y&&S&&a.jsxs("span",{className:"text-muted-foreground italic",children:[`
|
|
126
|
+
`,"... +",E," lines"]})]})]})})}if(e.type==="assistant"){const k=()=>typeof e.content=="string"?a.jsx(Rx,{text:e.content,markdownComponents:$f}):Array.isArray(e.content)?e.content.map((w,S)=>{const j=`${e.messageId}-${S}`;if(e.content.length-1,w.type==="text")return a.jsx("div",{children:a.jsx(Rx,{text:w.text,markdownComponents:$f})},j);if(w.type==="thinking")return a.jsx("div",{className:"my-1",children:a.jsxs("div",{className:"border border-amber-500/20 rounded-lg overflow-hidden bg-amber-500/5",children:[a.jsx("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-amber-500/10",children:a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-amber-400",children:"Thinking"})}),a.jsx("div",{className:"px-3 py-2 prose prose-sm max-w-none italic text-muted-foreground dark:prose-invert",children:a.jsx(Nc,{remarkPlugins:[Rc],components:$f,children:w.thinking})})]})},j);if(w.type==="tool_use"){const E=t[w.id],M=(!E||E.status==="pending")&&f,R=["Read","Edit","MultiEdit","Write","Grep","Glob","LS","Bash","TodoRead","TodoWrite"].includes(w.name),P=p?.toolUseId===w.id?p.id:void 0;return R?a.jsx("div",{className:"w-full",children:a.jsx(Ax,{toolUse:w,toolResult:E,toolResults:t,workingDirectory:e.workingDirectory,childrenMessages:n,expandedTasks:s,onToggleTaskExpanded:o,questionId:P,onAnswerQuestion:m})},j):a.jsxs("div",{className:"flex gap-2 items-start",children:[a.jsx("div",{className:`w-4 h-5 flex-shrink-0 flex items-center justify-center text-foreground relative ${M?"animate-pulse":""}`,children:rL(w.name)}),a.jsx("div",{className:"flex-1 flex flex-col gap-2 min-w-0 break-words",children:a.jsx(Ax,{toolUse:w,toolResult:E,toolResults:t,workingDirectory:e.workingDirectory,childrenMessages:n,expandedTasks:s,onToggleTaskExpanded:o,questionId:P,onAnswerQuestion:m})})]},j)}return a.jsx("div",{className:"my-1",children:a.jsxs("div",{className:"border border-zinc-500/20 rounded-lg overflow-hidden bg-zinc-500/5",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-zinc-500/10",children:[a.jsx(i1,{size:14,className:"text-zinc-400 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-400",children:"Data"})]}),a.jsx("div",{className:"px-3 py-2 text-sm leading-relaxed text-foreground",children:a.jsx(Nx,{data:w})})]})},j)}):a.jsx("div",{className:"my-1",children:a.jsxs("div",{className:"border border-zinc-500/20 rounded-lg overflow-hidden bg-zinc-500/5",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-zinc-500/10",children:[a.jsx(i1,{size:14,className:"text-zinc-400 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-400",children:"Data"})]}),a.jsx("div",{className:"px-3 py-2 text-sm leading-relaxed text-foreground",children:a.jsx(Nx,{data:e.content})})]})});return a.jsx("div",{className:"relative w-full flex flex-col gap-3 my-1",children:k()})}return e.type==="error"?a.jsx("div",{className:"my-1",children:a.jsxs("div",{className:"border border-red-500/30 rounded-lg overflow-hidden bg-red-500/5",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-red-500/20",children:[a.jsx(E2,{size:14,className:"text-red-400 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-red-400",children:"Error"})]}),a.jsx("div",{className:"px-3 py-3 text-sm text-red-200 font-mono whitespace-pre-wrap",children:String(e.content)})]})}):null}function iL({input:e,result:t,toolUseId:n,childrenMessages:s={},toolResults:o={}}){const l=n&&s[n]&&s[n].length>0,c=n?s[n]||[]:[],[f,p]=d.useState(!1),[m,h]=d.useState(!1),g=d.useRef(null),y=e?.description||"Subagent task",b=e?.subagent_type||"general";return d.useEffect(()=>{!m&&g.current&&c.length>0&&g.current.scrollTo({top:g.current.scrollHeight,behavior:"smooth"})},[c.length,m]),a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:f,onOpenChange:p,children:a.jsxs("div",{className:"border border-purple-500/30 rounded-lg overflow-hidden bg-purple-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-purple-500/10 transition-colors",children:[f?a.jsx(cn,{size:16,className:"text-purple-400"}):a.jsx(An,{size:16,className:"text-purple-400"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ha,{size:16,className:"text-purple-400"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-purple-400",children:"Task"})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1",children:y}),b!=="general"&&a.jsx("span",{className:"text-xs text-muted-foreground bg-purple-500/20 px-2 py-0.5 rounded",children:b})]})}),a.jsxs(_r,{children:[l&&a.jsxs("div",{className:"border-t border-purple-500/20 relative",children:[a.jsx(Oe,{variant:"ghost",size:"sm",className:"absolute top-2 right-2 h-6 w-6 p-0 text-muted-foreground hover:bg-background hover:text-foreground z-10",onClick:k=>{k.stopPropagation(),h(!m)},"aria-label":m?"Collapse height":"Expand height",children:m?a.jsx(Kc,{size:14}):a.jsx(Gc,{size:14})}),a.jsx("div",{ref:g,className:`${m?"max-h-96 overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border":"max-h-32 overflow-hidden [mask-image:linear-gradient(180deg,black_0,black_70%,transparent_100%)]"} p-4 pt-8 pb-2 relative bg-background/50`,children:c.map(k=>a.jsx(t4,{message:k,toolResults:o},k.messageId))})]}),t&&!l&&a.jsx("div",{className:"border-t border-purple-500/20",children:a.jsx("pre",{className:"m-0 px-3 py-3 text-neutral-100 font-mono text-xs leading-relaxed whitespace-pre-wrap break-words bg-neutral-950",children:t})})]})]})})})}function oL({input:e,result:t}){const n=e.plan||t||"No plan provided";return a.jsx("div",{className:"flex flex-col gap-1 -mt-0.5",children:a.jsx("div",{className:"bg-secondary rounded-xl p-4 mt-1 border-l-3 border-accent prose prose-sm prose-neutral dark:prose-invert max-w-none",children:a.jsx(Nc,{remarkPlugins:[Rc],components:{p:({children:s})=>a.jsx("p",{className:"my-2 first:mt-0 last:mb-0",children:s}),ul:({children:s})=>a.jsx("ul",{className:"my-2 pl-6 first:mt-0 last:mb-0",children:s}),ol:({children:s})=>a.jsx("ol",{className:"my-2 pl-6 first:mt-0 last:mb-0",children:s}),li:({children:s})=>a.jsx("li",{className:"my-1",children:s}),h1:({children:s})=>a.jsx("h1",{className:"mt-4 mb-2 first:mt-0 font-semibold",children:s}),h2:({children:s})=>a.jsx("h2",{className:"mt-4 mb-2 first:mt-0 font-semibold",children:s}),h3:({children:s})=>a.jsx("h3",{className:"mt-4 mb-2 first:mt-0 font-semibold",children:s}),h4:({children:s})=>a.jsx("h4",{className:"mt-4 mb-2 first:mt-0 font-semibold",children:s}),h5:({children:s})=>a.jsx("h5",{className:"mt-4 mb-2 first:mt-0 font-semibold",children:s}),h6:({children:s})=>a.jsx("h6",{className:"mt-4 mb-2 first:mt-0 font-semibold",children:s}),table:({children:s})=>a.jsx("div",{className:"my-3 not-prose",children:a.jsx("div",{className:"border border-zinc-500/30 rounded-lg overflow-hidden bg-zinc-500/5",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsx("table",{className:"w-full text-sm",children:s})})})}),thead:({children:s})=>a.jsx("thead",{className:"bg-zinc-500/10 border-b border-zinc-500/20",children:s}),tbody:({children:s})=>a.jsx("tbody",{className:"divide-y divide-zinc-500/10",children:s}),tr:({children:s})=>a.jsx("tr",{className:"hover:bg-zinc-500/5 transition-colors",children:s}),th:({children:s})=>a.jsx("th",{className:"px-3 py-2 text-left text-xs font-semibold uppercase tracking-wider text-zinc-400",children:s}),td:({children:s})=>a.jsx("td",{className:"px-3 py-2 text-foreground",children:s})},children:n})})})}function aL({input:e,result:t,questionId:n,onAnswer:s,isPending:o=!1}){const[l,c]=d.useState({}),[f,p]=d.useState(!1),m=e.questions||[];if(t)return a.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx($n,{size:14,className:"text-green-500"}),a.jsx("span",{children:"Question answered"})]});const h=(b,k,w)=>{c(S=>{const j={...S};return j[b]||(j[b]=new Set),w?j[b].has(k)?j[b].delete(k):j[b].add(k):j[b]=new Set([k]),j})},g=async()=>{if(!n||!s)return;const b=[];if(m.forEach((k,w)=>{const S=l[w];if(S&&S.size>0){const j=Array.from(S).join(", ");m.length>1?b.push(`${k.header||`Q${w+1}`}: ${j}`):b.push(j)}}),b.length!==0){p(!0);try{await s(n,b.join(`
|
|
127
|
+
`))}finally{p(!1)}}},y=m.every((b,k)=>l[k]&&l[k].size>0);return a.jsxs("div",{className:"my-2 border border-sky-500/30 rounded-lg overflow-hidden bg-sky-500/5",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-sky-500/20 bg-sky-500/10",children:[a.jsx(yj,{size:16,className:"text-sky-400"}),a.jsx("span",{className:"text-sm font-medium text-sky-300",children:"Claude is asking a question"})]}),a.jsxs("div",{className:"p-3 space-y-4",children:[m.map((b,k)=>a.jsxs("div",{className:"space-y-2",children:[b.header&&a.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-sky-400",children:b.header}),a.jsx("div",{className:"text-sm text-foreground",children:b.question}),a.jsx("div",{className:"space-y-1.5",children:b.options.map((w,S)=>{const j=l[k]?.has(w.label);return a.jsx("button",{onClick:()=>h(k,w.label,b.multiSelect||!1),disabled:o||f,className:`w-full text-left px-3 py-2 rounded-md border transition-all ${j?"border-sky-500 bg-sky-500/20 text-sky-100":"border-border/50 bg-secondary/50 hover:border-sky-500/50 hover:bg-sky-500/10"} ${o||f?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{className:`mt-0.5 w-4 h-4 rounded-${b.multiSelect?"sm":"full"} border flex items-center justify-center flex-shrink-0 ${j?"border-sky-500 bg-sky-500":"border-muted-foreground/50"}`,children:j&&a.jsx($n,{size:10,className:"text-white"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"text-sm font-medium",children:w.label}),w.description&&a.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:w.description})]})]})},S)})})]},k)),a.jsx("button",{onClick:g,disabled:!y||o||f||!n,className:`w-full flex items-center justify-center gap-2 px-4 py-2 rounded-md font-medium transition-all ${y&&!o&&!f&&n?"bg-sky-500 hover:bg-sky-600 text-white cursor-pointer":"bg-secondary text-muted-foreground cursor-not-allowed"}`,children:f?a.jsx(a.Fragment,{children:"Submitting..."}):a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"Submit Answer"}),a.jsx(An,{size:16})]})})]})]})}function lL({toolName:e,input:t,result:n}){const[s,o]=d.useState(!1),l=c=>{try{const f=JSON.parse(c);return JSON.stringify(f,null,2)}catch{return c}};return a.jsx("div",{className:"flex flex-col gap-1 -mt-0.5",children:a.jsxs(Pr,{open:s,onOpenChange:o,children:[a.jsx(Mr,{asChild:!0,children:a.jsxs("div",{className:"text-sm text-muted-foreground cursor-pointer select-none hover:text-foreground flex items-center gap-1","aria-label":`Toggle ${e} details`,children:[a.jsx(GC,{size:12,className:`transition-transform ${s?"rotate-90":""}`}),e," completed"]})}),a.jsxs(_r,{className:"space-y-1",children:[n&&a.jsx("div",{className:"bg-neutral-950 rounded-xl overflow-hidden",children:a.jsx("pre",{className:"m-0 p-3 text-neutral-100 font-mono text-xs leading-relaxed whitespace-pre-wrap break-words",children:l(n||"No result")})}),t&&a.jsxs("div",{className:"bg-secondary rounded-xl p-3 overflow-x-auto font-mono text-xs leading-relaxed",children:[a.jsx("strong",{className:"text-foreground",children:"Input:"}),a.jsx("pre",{className:"m-0 mt-1 whitespace-pre-wrap break-words",children:JSON.stringify(t,null,2)})]})]})]})})}function n4({toolName:e,toolInput:t,toolResult:n,workingDirectory:s,toolUseId:o,childrenMessages:l,toolResults:c,questionId:f,onAnswerQuestion:p}){const[m,h]=d.useState(!1),y=n?.result?typeof n.result=="string"?n.result:Array.isArray(n.result)?n.result.filter(w=>w.type==="text").map(w=>w.text).join(`
|
|
128
|
+
`):"":"",b=n?.is_error===!0,k=!n||n.status==="pending";if(k){if(["Read","Edit","MultiEdit","Write","Grep","Glob","LS","Bash"].includes(e)){const j=(()=>{switch(e){case"Read":return{icon:eo,label:"Reading",detail:Qi(t?.file_path||"",s),borderClass:"border-sky-500/30",bgClass:"bg-sky-500/5",textClass:"text-sky-400"};case"Edit":case"MultiEdit":return{icon:nm,label:"Editing",detail:Qi(t?.file_path||"",s),borderClass:"border-amber-500/30",bgClass:"bg-amber-500/5",textClass:"text-amber-400"};case"Write":return{icon:Xp,label:"Writing",detail:Qi(t?.file_path||"",s),borderClass:"border-emerald-500/30",bgClass:"bg-emerald-500/5",textClass:"text-emerald-400"};case"Bash":return{icon:Qc,label:"Running",detail:t?.command?.slice(0,60)||"",borderClass:"border-violet-500/30",bgClass:"bg-violet-500/5",textClass:"text-violet-400"};case"Grep":return{icon:ii,label:"Searching",detail:t?.pattern||"",borderClass:"border-orange-500/30",bgClass:"bg-orange-500/5",textClass:"text-orange-400"};case"Glob":return{icon:ii,label:"Finding",detail:t?.pattern||"",borderClass:"border-orange-500/30",bgClass:"bg-orange-500/5",textClass:"text-orange-400"};case"LS":return{icon:qc,label:"Listing",detail:t?.path||".",borderClass:"border-orange-500/30",bgClass:"bg-orange-500/5",textClass:"text-orange-400"};default:return{icon:eo,label:e,detail:"",borderClass:"border-zinc-500/30",bgClass:"bg-zinc-500/5",textClass:"text-zinc-400"}}})(),E=j.icon;return a.jsx("div",{className:"my-1",children:a.jsx("div",{className:`border ${j.borderClass} rounded-lg overflow-hidden ${j.bgClass}`,children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[a.jsx(aa,{size:16,className:`${j.textClass} flex-shrink-0 animate-spin`}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(E,{size:16,className:`${j.textClass} flex-shrink-0`}),a.jsx("span",{className:`text-xs font-semibold uppercase tracking-wider ${j.textClass}`,children:j.label})]}),a.jsx("span",{className:"text-sm text-foreground truncate flex-1",children:j.detail})]})})})}return null}if(b){const w=y||"Tool execution failed";return a.jsx("div",{className:"my-1",children:a.jsx(Pr,{open:m,onOpenChange:h,children:a.jsxs("div",{className:"border border-red-500/30 rounded-lg overflow-hidden bg-red-500/5",children:[a.jsx(Mr,{className:"w-full text-left cursor-pointer select-none",children:a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-red-500/10 transition-colors",children:[m?a.jsx(cn,{size:16,className:"text-red-400"}):a.jsx(An,{size:16,className:"text-red-400"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(E2,{size:16,className:"text-red-400"}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-red-400",children:"Error"})]}),a.jsxs("span",{className:"text-sm text-red-300 truncate flex-1",children:[w.split(`
|
|
129
|
+
`)[0].slice(0,80),w.split(`
|
|
130
|
+
`)[0].length>80?"...":""]})]})}),a.jsx(_r,{children:a.jsx("div",{className:"border-t border-red-500/20 px-3 py-3 text-sm text-red-200 font-mono whitespace-pre-wrap bg-red-950/30",children:w})})]})})})}switch(e){case"Read":return a.jsx(x7,{input:t,result:y,workingDirectory:s});case"Edit":case"MultiEdit":return a.jsx(N7,{input:t,result:y,isMultiEdit:e==="MultiEdit",workingDirectory:s});case"Write":return a.jsx(A7,{input:t,result:y,workingDirectory:s});case"Bash":return a.jsx(T7,{input:t,result:y});case"Grep":case"Glob":case"LS":return a.jsx(I7,{input:t,result:y,toolType:e});case"TodoRead":case"TodoWrite":return a.jsx(M7,{input:t,result:y,isWrite:e==="TodoWrite"});case"WebSearch":case"WebFetch":return a.jsx(_7,{input:t,result:y,toolType:e});case"Task":return a.jsx(iL,{input:t,result:y,toolUseId:o,childrenMessages:l,toolResults:c});case"exit_plan_mode":case"ExitPlanMode":return a.jsx(oL,{input:t,result:y});case"AskUserQuestion":return a.jsx(aL,{input:t,result:y,questionId:f,onAnswer:p,isPending:k});default:return a.jsx(lL,{toolName:e,input:t,result:y})}}function cL({permissionRequest:e,isVisible:t}){return!t||!e?null:a.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 z-[1000] mb-3 w-full",role:"dialog","aria-label":"Permission request dialog",children:a.jsxs("div",{className:"bg-black border border-border rounded-xl shadow-[0_0_10px_rgba(0,0,0,0.15)] w-full max-h-[70vh] flex flex-col overflow-hidden animate-slide-up",children:[a.jsx("div",{className:"px-4 pt-3",children:a.jsx("div",{className:"text-sm font-semibold mb-2.5 text-white",role:"heading","aria-level":2,children:"PERMISSION REQUEST:"})}),a.jsxs("div",{className:"px-4 pb-4 pt-[15px] m-0.5 rounded-[7px] overflow-y-auto bg-background flex-1",children:[a.jsx(Tv,{toolName:e.toolName,toolInput:e.toolInput}),a.jsx(n4,{toolName:e.toolName,toolInput:e.toolInput})]})]})})}function uL({audioData:e,isRecording:t,isPaused:n}){const s=d.useRef(null),o=d.useRef(),l=d.useRef([]),c=d.useRef(null),f=d.useRef(0),p=d.useRef(null),m=1,h=2,y=1e3/15,b=d.useCallback(()=>typeof window<"u"?document.documentElement.classList.contains("dark")?"#ececec":"#0d0d0d":"#000000",[]),k=d.useCallback(()=>{const E=s.current,N=p.current;if(!E||!N)return;const M=E.getContext("2d");if(!M)return;const R=N.getBoundingClientRect().width,P=24;E.width=R,E.height=P,M.imageSmoothingEnabled=!0,M.imageSmoothingQuality="high",c.current=M;const L=Math.floor(R/(m+h));l.current=new Array(L).fill(.08)},[m,h]),w=d.useCallback(()=>{const E=c.current,N=s.current;if(!E||!N)return;E.clearRect(0,0,N.width,N.height);const M=N.height/2,_=M*.8,R=b();E.fillStyle=R,l.current.forEach((P,L)=>{const G=L*(m+h),D=P*_;D>0&&(E.fillRect(G,M-D,m,D),E.fillRect(G,M,m,D))})},[m,h,b]),S=d.useCallback(E=>{if(!e||n||E-f.current<y)return!1;f.current=E;let N=0;for(let P=0;P<e.length;P++)N+=e[P];let _=N/e.length/255*3;return _=Math.min(_,1),_*=.7+Math.random()*.6,_=Math.max(_,.08),l.current.shift(),l.current.push(_),!0},[e,n,y]),j=d.useCallback(E=>{if(!t)return;S(E)&&w(),o.current=requestAnimationFrame(j)},[t,S,w]);return d.useEffect(()=>{k()},[k]),d.useEffect(()=>{w()},[w]),d.useEffect(()=>{if(t){const E=N=>j(N);o.current=requestAnimationFrame(E)}else o.current&&cancelAnimationFrame(o.current);return()=>{o.current&&cancelAnimationFrame(o.current)}},[t,j]),d.useEffect(()=>{n&&w()},[n,w]),d.useEffect(()=>{w()},[w]),a.jsx("div",{ref:p,className:"w-full bg-transparent flex items-center justify-start","aria-label":"Audio waveform visualization",children:a.jsx("canvas",{ref:s,className:"bg-transparent w-full","aria-hidden":"true"})})}const Tx={get(e,t){try{const n=localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}},set(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}},remove(e){try{localStorage.removeItem(e)}catch{}}};function dL(e,t){const[n,s]=d.useState(()=>Tx.get(e,t)),o=d.useCallback(l=>{s(c=>{const f=l instanceof Function?l(c):l;return Tx.set(e,f),f})},[e]);return d.useEffect(()=>{const l=c=>{if(c.key===e&&c.newValue)try{s(JSON.parse(c.newValue))}catch{}};return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[e]),[n,o]}function fL(){const[e,t]=d.useState("idle"),[n,s]=d.useState(null),[o,l]=d.useState(0),[c,f]=d.useState(null),p=d.useRef(null),m=d.useRef([]),h=d.useRef(null),g=d.useRef(0),y=d.useRef(null),b=d.useRef(null),k=d.useRef(null),w=d.useRef(null),S=typeof MediaRecorder<"u"&&!!navigator.mediaDevices?.getUserMedia,j=d.useCallback(async()=>{if(!S){s("Audio recording is not supported in this browser");return}try{s(null),t("recording");const M=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});h.current=M,m.current=[];const _=new AudioContext,R=_.createAnalyser(),P=_.createMediaStreamSource(M);R.fftSize=256,R.smoothingTimeConstant=.8,P.connect(R),b.current=_,k.current=R;const L=new MediaRecorder(M,{mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:16e3});p.current=L,L.ondataavailable=D=>{D.data.size>0&&m.current.push(D.data)};const G=()=>{if(k.current){const D=new Uint8Array(k.current.frequencyBinCount);k.current.getByteFrequencyData(D),f(D),w.current=requestAnimationFrame(G)}};G(),L.start(250),g.current=Date.now(),l(0),y.current=setInterval(()=>{g.current>0&&l(Math.floor((Date.now()-g.current)/1e3))},100)}catch(M){t("idle"),M instanceof Error?M.name==="NotAllowedError"?s("Microphone access denied. Please allow microphone access and try again."):M.name==="NotFoundError"?s("No microphone found. Please check your audio device."):s(`Failed to start recording: ${M.message}`):s("Failed to start recording")}},[S]),E=d.useCallback(async()=>!p.current||e!=="recording"?null:new Promise(M=>{const _=p.current;t("processing"),y.current&&(clearInterval(y.current),y.current=null),_.onstop=async()=>{try{const R=new Blob(m.current,{type:"audio/webm;codecs=opus"});console.log("Audio recording completed:",{size:`${R.size} bytes (${(R.size/1024).toFixed(2)} KB)`,duration:`${Math.floor((Date.now()-g.current)/1e3)}s`,format:"audio/webm;codecs=opus"});const P=new FileReader;P.onloadend=()=>{const G=P.result.split(",")[1],D={audioBlob:R,audioBase64:G,mimeType:"audio/webm;codecs=opus",duration:Math.floor((Date.now()-g.current)/1e3)};M(D)},P.onerror=()=>{s("Failed to process recorded audio"),t("idle"),M(null)},P.readAsDataURL(R)}catch{s("Failed to process recorded audio"),t("idle"),M(null)}finally{w.current&&(cancelAnimationFrame(w.current),w.current=null),b.current&&(b.current.close(),b.current=null),k.current=null,f(null),h.current&&(h.current.getTracks().forEach(R=>R.stop()),h.current=null)}},_.stop()}),[e]),N=d.useCallback(()=>{t("idle")},[]);return{state:e,startRecording:j,stopRecording:E,resetToIdle:N,error:n,duration:o,isSupported:S,audioData:c}}function pL({selectedDirectory:e,recentDirectories:t,onDirectorySelect:n}){const[s,o]=d.useState(!1),l=Object.entries(t).map(([f,p])=>({value:f,label:p.shortname})).sort((f,p)=>{const m=t[f.value].lastDate,h=t[p.value].lastDate;return new Date(h).getTime()-new Date(m).getTime()}),c=e==="Select directory"?e:t[e]?.shortname||e.split("/").pop()||e;return a.jsx(hm,{options:l,value:e,onChange:f=>{n(f),o(!1)},isOpen:s,onOpenChange:o,placeholder:"Enter a directory...",showFilterInput:!0,filterPredicate:(f,p)=>!!f.value.toLowerCase().includes(p.toLowerCase()),renderTrigger:({onClick:f})=>a.jsx(Oe,{type:"button",variant:"ghost",size:"sm",className:"h-8 px-2 text-muted-foreground hover:bg-muted/50 rounded-full",onClick:f,"aria-label":"View all code environments",children:a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(dj,{size:14}),a.jsx("span",{className:"block max-w-[128px] overflow-hidden text-ellipsis whitespace-nowrap",children:c}),a.jsx(cn,{size:14})]})})})}function mL({selectedModel:e,availableModels:t,onModelSelect:n}){const[s,o]=d.useState(!1),l=p=>{switch(p){case"sonnet":return a.jsx(va,{size:14});case"opus":return a.jsx(XC,{size:14});case"default":return a.jsx(ip,{size:14});default:return a.jsx(ip,{size:14})}},c=t.map(p=>({value:p,label:p==="default"?"Default":p.charAt(0).toUpperCase()+p.slice(1)})),f=e==="default"?"Default":e.charAt(0).toUpperCase()+e.slice(1);return a.jsx(hm,{options:c,value:e,onChange:p=>{n(p),o(!1)},isOpen:s,onOpenChange:o,showFilterInput:!1,renderOption:p=>a.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l(p.value),a.jsx("span",{className:"text-sm font-medium",children:p.label})]}),renderTrigger:({onClick:p})=>a.jsx(Oe,{type:"button",variant:"ghost",size:"sm",className:"h-8 px-2 text-muted-foreground hover:bg-muted/50 rounded-full",onClick:p,"aria-label":"Select AI model",children:a.jsxs("span",{className:"flex items-center gap-1.5",children:[l(e),a.jsx("span",{className:"block max-w-[128px] overflow-hidden text-ellipsis whitespace-nowrap",children:f}),a.jsx(cn,{size:14})]})})})}function hL({suggestions:e,onSelect:t,onClose:n,isOpen:s,focusedIndex:o,type:l,onFocusReturn:c}){if(!s)return null;const f=e.map(p=>{if(l==="command"){const m=p;return{value:m.name,label:m.name,description:m.description,disabled:!1}}else{const m=p;return{value:m.name,label:m.name,disabled:!1}}});return a.jsx(hm,{options:f,value:void 0,onChange:t,isOpen:s,onOpenChange:p=>{p||n()},showFilterInput:!1,maxVisibleItems:-1,initialFocusedIndex:o,focusedIndexControlled:o,visualFocusOnly:!0,onFocusReturn:c,renderOption:l==="command"?p=>a.jsxs("div",{className:"flex flex-col items-start gap-0.5 w-full",children:[a.jsx("span",{className:"text-sm",children:p.label}),p.description&&a.jsx("span",{className:"text-xs text-muted-foreground/80",children:p.description})]}):void 0,renderTrigger:()=>a.jsx("div",{className:"w-0 h-0 pointer-events-none opacity-0"})})}const r4=d.forwardRef(function({value:t,onChange:n,onSubmit:s,placeholder:o="Type a message...",isLoading:l=!1,disabled:c=!1,showDirectorySelector:f=!1,showModelSelector:p=!1,enableFileAutocomplete:m=!1,showPermissionUI:h=!1,showStopButton:g=!1,showDictation:y=!0,showStatusBar:b=!0,compact:k=!1,workingDirectory:w="",onDirectoryChange:S,recentDirectories:j={},getMostRecentWorkingDirectory:E,model:N="default",onModelChange:M,availableModels:_=["default","opus","sonnet"],permissionRequest:R,onPermissionDecision:P,onStop:L,onForceKill:G,isSessionActive:D=!1,isInitializing:B=!1,sessionStartTime:W,fileSystemEntries:Y=[],onFetchFileSystem:Q,availableCommands:F=[],onFetchCommands:Z},K){const{serverConfig:O}=Ov(),[J,T]=dL("claudia-composer",{selectedPermissionMode:"default",draft:""}),[z,H]=d.useState(J.draft),I=t!==void 0?t:z,ie=we=>{t===void 0&&H(we),n?.(we)},[se,le]=d.useState(w||"Select directory"),[te,oe]=d.useState(N),[ce,re]=d.useState(J.selectedPermissionMode),[ge,be]=d.useState(!1),[Pe,Ze]=d.useState(Y),[ct,ft]=d.useState(F),[Ye,jt]=d.useState({isActive:!1,triggerIndex:-1,query:"",suggestions:[],focusedIndex:-1,type:"file"}),et=d.useRef(null),Kt=d.useRef(null),[Qt,nn]=d.useState("0:00");d.useEffect(()=>{if(!D||!W){nn("0:00");return}const we=()=>{const qe=Math.floor((Date.now()-W)/1e3),tt=Math.floor(qe/60),gt=qe%60;nn(`${tt}:${gt.toString().padStart(2,"0")}`)};we();const Fe=setInterval(we,1e3);return()=>clearInterval(Fe)},[D,W]);const{state:vt,startRecording:Bn,stopRecording:rr,resetToIdle:ae,error:xe,isSupported:de,audioData:fe}=fL();d.useImperativeHandle(K,()=>({focusInput:()=>{et.current&&et.current.focus()}}),[]),d.useEffect(()=>{O?.defaultPermissionMode&&J.selectedPermissionMode==="default"&&re(O.defaultPermissionMode)},[O?.defaultPermissionMode,J.selectedPermissionMode]),d.useEffect(()=>{w&&le(w)},[w]),d.useEffect(()=>{N&&oe(N)},[N]),d.useEffect(()=>{Y.length>0&&Ze(Y)},[Y]),d.useEffect(()=>{F.length>0&&ft(F)},[F]),d.useEffect(()=>{T({selectedPermissionMode:ce,draft:I})},[ce,I,T]),d.useEffect(()=>{if(f&&(!w||se==="Select directory")&&Object.keys(j).length>0&&E){const we=E();we&&(le(we),S?.(we),m&&Q&&Q(we).then(Fe=>Ze(Fe)).catch(Fe=>console.error("Failed to fetch file system entries:",Fe)))}},[w,se,j,E,f,S,m,Q]),d.useEffect(()=>{if(!m||!Q)return;const we=async()=>{if(se&&se!=="Select directory")try{const qe=await Q(se);Ze(qe)}catch(qe){console.error("Failed to fetch file system entries:",qe)}},Fe=et.current;if(Fe){const qe=()=>we();return Fe.addEventListener("focus",qe),()=>Fe.removeEventListener("focus",qe)}},[se,m,Q]),d.useEffect(()=>{if(!Z)return;const we=async()=>{try{const qe=await Z(se!=="Select directory"?se:void 0);ft(qe)}catch(qe){console.error("Failed to fetch commands:",qe)}};we();const Fe=et.current;if(Fe){const qe=()=>we();return Fe.addEventListener("focus",qe),()=>Fe.removeEventListener("focus",qe)}},[se,Z]);const ke=(we,Fe)=>{const qe=we.substring(0,Fe),tt=qe.lastIndexOf("@");if(tt===-1)return null;const gt=qe.substring(tt+1);return gt.includes(" ")||gt.includes(`
|
|
131
|
+
`)?null:{triggerIndex:tt,query:gt,type:"file"}},Be=(we,Fe)=>{const qe=we.substring(0,Fe),tt=qe.lastIndexOf("/");if(tt===-1)return null;const gt=qe.substring(0,tt);if(gt.trim()!==""&&!gt.endsWith(`
|
|
132
|
+
`)&&!gt.endsWith(" "))return null;const zt=qe.substring(tt+1);return zt.includes(" ")||zt.includes(`
|
|
133
|
+
`)?null:{triggerIndex:tt,query:zt,type:"command"}},Ke=we=>{if(!Pe)return[];if(!we)return Pe.slice(0,50);const Fe=we.toLowerCase();return Pe.filter(qe=>qe.name.toLowerCase().includes(Fe)).slice(0,50)},it=we=>{if(!ct)return[];if(!we)return ct.slice(0,50);const Fe=we.toLowerCase();return ct.filter(qe=>qe.name.toLowerCase().includes(Fe)).slice(0,50)},ot=()=>{jt({isActive:!1,triggerIndex:-1,query:"",suggestions:[],focusedIndex:-1,type:"file"})},bt=we=>{if(!et.current)return;const Fe=et.current.selectionStart;if(Ye.type==="command"){const qe=I.substring(0,Ye.triggerIndex)+we+" "+I.substring(Fe);ie(qe),ot(),setTimeout(()=>{if(et.current){const tt=Ye.triggerIndex+we.length+1;et.current.setSelectionRange(tt,tt),et.current.focus(),Tn()}},0)}else{const qe=I.substring(0,Ye.triggerIndex+1)+we+" "+I.substring(Fe);ie(qe),ot(),setTimeout(()=>{if(et.current){const tt=Ye.triggerIndex+1+we.length+1;et.current.setSelectionRange(tt,tt),et.current.focus(),Tn()}},0)}},ht=we=>{const Fe=we.target.value;ie(Fe),Tn();const qe=we.target.selectionStart,tt=Be(Fe,qe);if(tt&&Z){const gt=it(tt.query);jt(zt=>({isActive:!0,triggerIndex:tt.triggerIndex,query:tt.query,suggestions:gt,type:tt.type,focusedIndex:zt.focusedIndex>=0&&zt.focusedIndex<gt.length?zt.focusedIndex:-1}));return}if(m){const gt=ke(Fe,qe);if(gt){const zt=Ke(gt.query);jt(or=>({isActive:!0,triggerIndex:gt.triggerIndex,query:gt.query,suggestions:zt,type:gt.type,focusedIndex:or.focusedIndex>=0&&or.focusedIndex<zt.length?or.focusedIndex:-1}));return}}ot()},Lt=we=>{const Fe=I.trim();!Fe||l||f&&se==="Select directory"||(s(Fe,f?se:w,p?te:void 0,we),ie(""),ot())},Ft=we=>{if(Ye.isActive)switch(we.key){case"ArrowDown":we.preventDefault(),Ye.suggestions.length>0&&jt(Fe=>({...Fe,focusedIndex:Fe.focusedIndex<0?0:(Fe.focusedIndex+1)%Fe.suggestions.length}));break;case"ArrowUp":we.preventDefault(),Ye.suggestions.length>0&&jt(Fe=>({...Fe,focusedIndex:Fe.focusedIndex<0||Fe.focusedIndex===0?Fe.suggestions.length-1:Fe.focusedIndex-1}));break;case"Enter":case"Tab":if(!we.metaKey&&!we.ctrlKey&&(we.preventDefault(),Ye.suggestions.length>0)){const Fe=Ye.focusedIndex>=0?Ye.focusedIndex:0,qe=Ye.suggestions[Fe],tt=(Ye.type==="command",qe.name);bt(tt)}break;case" ":ot();break;case"Escape":we.preventDefault(),ot(),setTimeout(()=>et.current?.focus(),0);break}else if(we.key==="Enter"){if(we.shiftKey)return;we.preventDefault(),Lt(ce)}},Tn=()=>{const we=et.current;if(we){we.style.height="auto";const Fe=Math.floor(window.innerHeight*.8);we.style.height=`${Math.min(we.scrollHeight,Fe)}px`}};d.useEffect(()=>{Tn()},[I]),d.useEffect(()=>{const we=()=>{Tn()};return window.addEventListener("resize",we),()=>window.removeEventListener("resize",we)},[]);const Fr=we=>{le(we),S?.(we)},sr=we=>{oe(we),M?.(we)},ir=async()=>{vt==="idle"&&await Bn()},fi=async()=>{if(vt==="recording"){const we=await rr();if(we)try{const Fe=await Ee.transcribeAudio(we.audioBase64,we.mimeType);if(et.current&&Fe.text.trim()){const tt=et.current.selectionStart,gt=I.substring(0,tt),zt=I.substring(tt),or=Fe.text.trim(),_e=(gt.length>0&&!gt.endsWith(" ")&&!gt.endsWith(`
|
|
134
|
+
`)?" ":"")+or,Vn=gt+_e+zt;ie(Vn),setTimeout(()=>{if(et.current){const Dr=tt+_e.length;et.current.setSelectionRange(Dr,Dr),et.current.focus(),Tn()}},0)}else Fe.text.trim()||console.warn("No speech detected in audio")}catch(Fe){console.error("Transcription failed:",Fe)}finally{ae()}else ae()}},Or=async()=>{(vt==="recording"||vt==="processing")&&(await rr(),ae())};return a.jsxs("form",{ref:Kt,className:"w-full relative",onSubmit:we=>{we.preventDefault(),Lt(ce)},children:[a.jsxs("div",{className:Ne("rounded-lg overflow-hidden border-2 transition-all duration-300",b&&D?"border-green-500/50":b&&B?"border-amber-500/50":"border-border"),children:[b&&a.jsx("div",{className:Ne("flex items-center gap-2 px-3 py-1.5 border-b text-sm",D?"bg-green-500/10 border-green-500/30":B?"bg-amber-500/10 border-amber-500/30":"bg-muted/30 border-border"),children:D?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"relative flex h-2 w-2",children:[a.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),a.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-500"})]}),a.jsx("span",{className:"text-green-600 dark:text-green-400 font-medium",children:"Active"}),a.jsx("span",{className:"text-green-600/70 dark:text-green-400/70 tabular-nums",children:Qt})]}):B?a.jsxs(a.Fragment,{children:[a.jsx(aa,{size:14,className:"animate-spin text-amber-500"}),a.jsx("span",{className:"text-amber-600 dark:text-amber-400 font-medium",children:"Initializing"})]}):a.jsx("span",{className:"text-muted-foreground",children:"Inactive"})}),a.jsx("div",{className:"flex flex-col items-center justify-center w-full bg-transparent cursor-text",children:a.jsxs("div",{className:Ne("relative flex w-full",k?"min-h-[44px] items-center":"min-h-[73px] items-end"),children:[a.jsxs("div",{className:Ne("relative flex flex-1",k?"ml-0.5 mr-1 min-h-[44px] items-center":"mx-5 min-h-[73px] items-start"),children:[vt==="recording"||vt==="processing"?a.jsx("div",{className:"w-full min-h-[80px] pb-[34px] bg-transparent overflow-hidden flex items-center justify-start",children:a.jsx(uL,{audioData:fe,isRecording:vt==="recording",isPaused:vt==="processing"})}):a.jsx(Es,{ref:et,className:Ne("max-h-[80vh] border-none bg-transparent text-foreground font-sans leading-relaxed resize-none outline-none overflow-y-auto scrollbar-thin ring-0 focus-visible:ring-0 focus-visible:ring-offset-0",k?"min-h-[40px] py-2 pr-12 text-sm":"min-h-[80px] pt-4 pr-[60px] pb-[50px] text-base"),placeholder:R&&h?"Deny and tell Claude what to do":o,value:I,onChange:ht,onKeyDown:Ft,rows:1,disabled:(l||c)&&!(R&&h)}),vt==="processing"&&a.jsx("textarea",{ref:et,className:"absolute opacity-0 pointer-events-none -top-[9999px]",value:I,onChange:ht,rows:1,disabled:!0})]}),(f||p)&&vt==="idle"&&a.jsx("div",{className:"absolute bottom-2 left-6 right-10 flex items-center justify-center overflow-visible",children:a.jsx("div",{className:"flex gap-2 w-full justify-between",children:a.jsxs("div",{className:"flex gap-2",children:[f&&a.jsx(pL,{selectedDirectory:se,recentDirectories:j,onDirectorySelect:Fr}),p&&a.jsx(mL,{selectedModel:te,availableModels:_,onModelSelect:sr})]})})}),a.jsxs("div",{className:Ne("absolute flex items-center justify-center gap-2",k?"right-1.5 bottom-1.5":"right-2.5 bottom-2"),children:[vt==="recording"||vt==="processing"?a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{type:"button",variant:"secondary",size:"icon",className:"w-8 h-8 hover:scale-[1.03]",onClick:fi,disabled:vt==="processing",children:vt==="processing"?a.jsx(aa,{size:16,className:"animate-spin"}):a.jsx($n,{size:16})})}),a.jsx(pn,{children:a.jsx("p",{children:vt==="processing"?"Processing...":"Accept recording"})})]})}),a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{type:"button",variant:"secondary",size:"icon",className:"w-8 h-8 hover:scale-[1.03]",onClick:Or,disabled:vt==="processing",children:a.jsx(d1,{size:16})})}),a.jsx(pn,{children:a.jsx("p",{children:"Discard recording"})})]})})]}):y&&de&&a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{type:"button",variant:"ghost",size:"sm",className:Ne("h-8 px-2 text-muted-foreground hover:bg-muted/50 rounded-full",xe&&"bg-red-300 text-red-900 hover:bg-red-400 hover:text-red-950"),onClick:ir,disabled:c,children:xe?a.jsx(Cj,{size:16}):a.jsx(Ej,{size:16})})}),a.jsx(pn,{children:a.jsx("p",{children:xe?`Error: ${xe}`:"Start voice recording"})})]})}),R&&h?a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(Oe,{type:"button",className:"h-8 min-w-[60px] px-3 py-0.5 bg-blue-600 text-white hover:bg-blue-700 border-0 shadow-none rounded-full flex items-center gap-1.5",onClick:()=>P?.(R.id,"approve"),children:[a.jsx($n,{size:14}),a.jsx("span",{children:"Accept"})]}),a.jsxs(Oe,{type:"button",className:"h-8 min-w-[60px] px-3 py-0.5 bg-muted text-muted-foreground hover:bg-muted/80 border-0 shadow-none rounded-full flex items-center gap-1.5",onClick:()=>{const we=I.trim();P?.(R.id,"deny",we||void 0),ie("")},children:[a.jsx(d1,{size:14}),a.jsx("span",{children:"Deny"})]})]}):D?a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground hover:bg-muted",onClick:()=>L?.(),children:a.jsx(Gj,{size:16})})}),a.jsx(pn,{children:a.jsx("p",{children:"Stop (SIGTERM)"})})]})}),a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 text-red-500 hover:bg-red-500/10",onClick:()=>G?.(),children:a.jsx(va,{size:16})})}),a.jsx(pn,{children:a.jsx("p",{children:"Kill (SIGKILL)"})})]})})]}):vt==="idle"&&a.jsx(Oe,{type:"button",className:`h-8 w-8 p-0 border-0 shadow-none ${!I.trim()||l||c||f&&se==="Select directory"?"bg-muted text-muted-foreground":"bg-accent text-accent-foreground hover:bg-accent/90"}`,disabled:!I.trim()||l||c||f&&se==="Select directory",onClick:()=>Lt(ce),children:l?a.jsx(aa,{size:16,className:"animate-spin"}):a.jsx(Bj,{size:16})})]})]})})]}),(m||Z)&&a.jsx(hL,{suggestions:Ye.suggestions,onSelect:bt,onClose:ot,isOpen:Ye.isActive&&Ye.suggestions.length>0,focusedIndex:Ye.focusedIndex,type:Ye.type,onFocusReturn:()=>et.current?.focus()}),R&&h&&a.jsx(cL,{permissionRequest:R,isVisible:!0})]})});var Hf="rovingFocusGroup.onEntryFocus",gL={bubbles:!1,cancelable:!0},La="RovingFocusGroup",[Rp,s4,xL]=cy(La),[yL,i4]=Rr(La,[xL]),[vL,bL]=yL(La),o4=d.forwardRef((e,t)=>a.jsx(Rp.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Rp.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(wL,{...e,ref:t})})}));o4.displayName=La;var wL=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:o=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:h=!1,...g}=e,y=d.useRef(null),b=mt(t,y),k=Fp(l),[w,S]=es({prop:c,defaultProp:f??null,onChange:p,caller:La}),[j,E]=d.useState(!1),N=Is(m),M=s4(n),_=d.useRef(!1),[R,P]=d.useState(0);return d.useEffect(()=>{const L=y.current;if(L)return L.addEventListener(Hf,N),()=>L.removeEventListener(Hf,N)},[N]),a.jsx(vL,{scope:n,orientation:s,dir:k,loop:o,currentTabStopId:w,onItemFocus:d.useCallback(L=>S(L),[S]),onItemShiftTab:d.useCallback(()=>E(!0),[]),onFocusableItemAdd:d.useCallback(()=>P(L=>L+1),[]),onFocusableItemRemove:d.useCallback(()=>P(L=>L-1),[]),children:a.jsx(He.div,{tabIndex:j||R===0?-1:0,"data-orientation":s,...g,ref:b,style:{outline:"none",...e.style},onMouseDown:Ve(e.onMouseDown,()=>{_.current=!0}),onFocus:Ve(e.onFocus,L=>{const G=!_.current;if(L.target===L.currentTarget&&G&&!j){const D=new CustomEvent(Hf,gL);if(L.currentTarget.dispatchEvent(D),!D.defaultPrevented){const B=M().filter(Z=>Z.focusable),W=B.find(Z=>Z.active),Y=B.find(Z=>Z.id===w),F=[W,Y,...B].filter(Boolean).map(Z=>Z.ref.current);c4(F,h)}}_.current=!1}),onBlur:Ve(e.onBlur,()=>E(!1))})})}),a4="RovingFocusGroupItem",l4=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:o=!1,tabStopId:l,children:c,...f}=e,p=en(),m=l||p,h=bL(a4,n),g=h.currentTabStopId===m,y=s4(n),{onFocusableItemAdd:b,onFocusableItemRemove:k,currentTabStopId:w}=h;return d.useEffect(()=>{if(s)return b(),()=>k()},[s,b,k]),a.jsx(Rp.ItemSlot,{scope:n,id:m,focusable:s,active:o,children:a.jsx(He.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...f,ref:t,onMouseDown:Ve(e.onMouseDown,S=>{s?h.onItemFocus(m):S.preventDefault()}),onFocus:Ve(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:Ve(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){h.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const j=CL(S,h.orientation,h.dir);if(j!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let N=y().filter(M=>M.focusable).map(M=>M.ref.current);if(j==="last")N.reverse();else if(j==="prev"||j==="next"){j==="prev"&&N.reverse();const M=N.indexOf(S.currentTarget);N=h.loop?jL(N,M+1):N.slice(M+1)}setTimeout(()=>c4(N))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:w!=null}):c})})});l4.displayName=a4;var kL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function CL(e,t,n){const s=SL(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return kL[s]}function c4(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function jL(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var EL=o4,NL=l4,pu="Tabs",[AL]=Rr(pu,[i4]),u4=i4(),[RL,$m]=AL(pu),d4=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:o,defaultValue:l,orientation:c="horizontal",dir:f,activationMode:p="automatic",...m}=e,h=Fp(f),[g,y]=es({prop:s,onChange:o,defaultProp:l??"",caller:pu});return a.jsx(RL,{scope:n,baseId:en(),value:g,onValueChange:y,orientation:c,dir:h,activationMode:p,children:a.jsx(He.div,{dir:h,"data-orientation":c,...m,ref:t})})});d4.displayName=pu;var f4="TabsList",p4=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...o}=e,l=$m(f4,n),c=u4(n);return a.jsx(EL,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:s,children:a.jsx(He.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:t})})});p4.displayName=f4;var m4="TabsTrigger",h4=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:o=!1,...l}=e,c=$m(m4,n),f=u4(n),p=x4(c.baseId,s),m=y4(c.baseId,s),h=s===c.value;return a.jsx(NL,{asChild:!0,...f,focusable:!o,active:h,children:a.jsx(He.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:p,...l,ref:t,onMouseDown:Ve(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?c.onValueChange(s):g.preventDefault()}),onKeyDown:Ve(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&c.onValueChange(s)}),onFocus:Ve(e.onFocus,()=>{const g=c.activationMode!=="manual";!h&&!o&&g&&c.onValueChange(s)})})})});h4.displayName=m4;var g4="TabsContent",TL=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:o,children:l,...c}=e,f=$m(g4,n),p=x4(f.baseId,s),m=y4(f.baseId,s),h=s===f.value,g=d.useRef(h);return d.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),a.jsx(Ir,{present:o||h,children:({present:y})=>a.jsx(He.div,{"data-state":h?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":p,hidden:!y,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:y&&l})})});TL.displayName=g4;function x4(e,t){return`${e}-trigger-${t}`}function y4(e,t){return`${e}-content-${t}`}var IL=d4,PL=p4,ML=h4;function _L({className:e,...t}){return a.jsx(IL,{"data-slot":"tabs",className:Ne("flex flex-col gap-2",e),...t})}function LL({className:e,...t}){return a.jsx(PL,{"data-slot":"tabs-list",className:Ne("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Bf({className:e,...t}){return a.jsx(ML,{"data-slot":"tabs-trigger",className:Ne("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function FL({activeTab:e,onTabChange:t,onRefreshInsights:n,automatedCount:s}){const[o,l]=d.useState(!1),c=async()=>{if(!(o||!n)){l(!0);try{await n()}finally{l(!1)}}};return a.jsx(_L,{value:e,onValueChange:f=>t(f),className:"w-full",children:a.jsx("div",{className:"w-full border-b border-border",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(LL,{className:"flex justify-start gap-0 bg-transparent rounded-none h-auto p-0",children:[a.jsx(Bf,{value:"sessions",className:"cursor-pointer data-[state=active]:bg-transparent data-[state=active]:text-accent data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-accent border-b-2 border-transparent rounded-none py-3 px-4 text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors uppercase text-xs tracking-wider font-medium",children:"Sessions"}),a.jsxs(Bf,{value:"automated",className:"cursor-pointer data-[state=active]:bg-transparent data-[state=active]:text-accent data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-accent border-b-2 border-transparent rounded-none py-3 px-4 text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors uppercase text-xs tracking-wider font-medium flex items-center gap-1.5",children:[a.jsx(ip,{size:12}),"Automated",s!==void 0&&s>0&&a.jsxs("span",{className:"text-muted-foreground/60 tabular-nums",children:["(",s,")"]})]}),a.jsx(Bf,{value:"archive",className:"cursor-pointer data-[state=active]:bg-transparent data-[state=active]:text-accent data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-accent border-b-2 border-transparent rounded-none py-3 px-4 text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors uppercase text-xs tracking-wider font-medium",children:"Archive"})]}),n&&a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{variant:"ghost",size:"icon",onClick:c,disabled:o,className:"h-8 w-8 mr-2 text-muted-foreground hover:text-foreground",children:a.jsx(Oj,{size:14,className:o?"animate-spin":""})})}),a.jsx(pn,{children:a.jsx("p",{children:"Smart refresh (only regenerates if work shifted)"})})]})})]})})})}const OL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,112.49l-48,48a12,12,0,0,1-17-17L195,116H128a84.09,84.09,0,0,0-84,84,12,12,0,0,1-24,0A108.12,108.12,0,0,1,128,92h67L167.51,64.48a12,12,0,0,1,17-17l48,48A12,12,0,0,1,232.49,112.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,104l-48,48V56Z",opacity:"0.2"}),d.createElement("path",{d:"M229.66,98.34l-48-48A8,8,0,0,0,168,56V96H128A104.11,104.11,0,0,0,24,200a8,8,0,0,0,16,0,88.1,88.1,0,0,1,88-88h40v40a8,8,0,0,0,13.66,5.66l48-48A8,8,0,0,0,229.66,98.34ZM184,132.69V75.31L212.69,104Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,109.66l-48,48A8,8,0,0,1,168,152V112H128a88.1,88.1,0,0,0-88,88,8,8,0,0,1-16,0A104.11,104.11,0,0,1,128,96h40V56a8,8,0,0,1,13.66-5.66l48,48A8,8,0,0,1,229.66,109.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.24,108.24l-48,48a6,6,0,0,1-8.48-8.48L209.51,110H128a90.1,90.1,0,0,0-90,90,6,6,0,0,1-12,0A102.12,102.12,0,0,1,128,98h81.51L171.76,60.24a6,6,0,0,1,8.48-8.48l48,48A6,6,0,0,1,228.24,108.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,109.66l-48,48a8,8,0,0,1-11.32-11.32L204.69,112H128a88.1,88.1,0,0,0-88,88,8,8,0,0,1-16,0A104.11,104.11,0,0,1,128,96h76.69L170.34,61.66a8,8,0,0,1,11.32-11.32l48,48A8,8,0,0,1,229.66,109.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.83,106.83l-48,48a4,4,0,0,1-5.66-5.66L214.34,108H128a92.1,92.1,0,0,0-92,92,4,4,0,0,1-8,0A100.11,100.11,0,0,1,128,100h86.34L173.17,58.83a4,4,0,0,1,5.66-5.66l48,48A4,4,0,0,1,226.83,106.83Z"}))]]),DL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128l-72,72V56Z",opacity:"0.2"}),d.createElement("path",{d:"M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"}))]]),zL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),d.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"}))]]),$L=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,192.49l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,0,1,17-17L180,187V141L128,89,76,141V187l11.51-11.52a12,12,0,0,1,17,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L52,187V136a12,12,0,0,1,3.51-8.49L116,67V24a12,12,0,0,1,24,0V67l60.49,60.48A12,12,0,0,1,204,136v51l11.51-11.52a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M192,136v80H64V136l64-64Z",opacity:"0.2"}),d.createElement("path",{d:"M229.66,189.66l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L184,196.69V139.31l-56-56-56,56v57.38l18.34-18.35a8,8,0,0,1,11.32,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L56,196.69V136a8,8,0,0,1,2.34-5.66L120,68.69V24a8,8,0,0,1,16,0V68.69l61.66,61.65A8,8,0,0,1,200,136v60.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,189.66l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,160,176h24V139.31l-56-56-56,56V176H96a8,8,0,0,1,5.66,13.66l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,32,176H56V136a8,8,0,0,1,2.34-5.66L120,68.69V24a8,8,0,0,1,16,0V68.69l61.66,61.65A8,8,0,0,1,200,136v40h24a8,8,0,0,1,5.66,13.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.24,188.24l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L186,201.51v-63l-58-58-58,58v63l21.76-21.75a6,6,0,0,1,8.48,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L58,201.51V136a6,6,0,0,1,1.76-4.24L122,69.51V24a6,6,0,0,1,12,0V69.51l62.24,62.25A6,6,0,0,1,198,136v65.51l21.76-21.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,189.66l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L184,196.69V139.31l-56-56-56,56v57.38l18.34-18.35a8,8,0,0,1,11.32,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L56,196.69V136a8,8,0,0,1,2.34-5.66L120,68.69V24a8,8,0,0,1,16,0V68.69l61.66,61.65A8,8,0,0,1,200,136v60.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.83,186.83l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L188,206.34V137.66l-60-60-60,60v68.68l25.17-25.17a4,4,0,0,1,5.66,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L60,206.34V136a4,4,0,0,1,1.17-2.83L124,70.34V24a4,4,0,0,1,8,0V70.34l62.83,62.83A4,4,0,0,1,196,136v70.34l25.17-25.17a4,4,0,0,1,5.66,5.66Z"}))]]),HL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z",opacity:"0.2"}),d.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z"}))]]),BL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,88a16,16,0,1,1,16,16A16,16,0,0,1,140,88ZM100,72a16,16,0,1,0,16,16A16,16,0,0,0,100,72Zm120,72a91.84,91.84,0,0,1-2.34,20.64L236.81,173a12,12,0,0,1-9.62,22l-18-7.85a92,92,0,0,1-162.46,0l-18,7.85a12,12,0,1,1-9.62-22l19.15-8.36A91.84,91.84,0,0,1,36,144v-4H16a12,12,0,0,1,0-24H36v-4a91.84,91.84,0,0,1,2.34-20.64L19.19,83a12,12,0,0,1,9.62-22l18,7.85a92,92,0,0,1,162.46,0l18-7.85a12,12,0,1,1,9.62,22l-19.15,8.36A91.84,91.84,0,0,1,220,112v4h20a12,12,0,0,1,0,24H220ZM60,116H196v-4a68,68,0,0,0-136,0Zm56,94.92V140H60v4A68.1,68.1,0,0,0,116,210.92ZM196,144v-4H140v70.92A68.1,68.1,0,0,0,196,144Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,128v16a80,80,0,0,1-160,0V128Z",opacity:"0.2"}),d.createElement("path",{d:"M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M168,92a12,12,0,1,1-12-12A12,12,0,0,1,168,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216Zm-80,0a8,8,0,0,0-16,0v64a8,8,0,0,0,16,0Zm64-32a72,72,0,0,0-144,0v8H200Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M146,92a10,10,0,1,1,10,10A10,10,0,0,1,146,92ZM100,82a10,10,0,1,0,10,10A10,10,0,0,0,100,82Zm146,46a6,6,0,0,1-6,6H214v10a85.88,85.88,0,0,1-3.45,24.08L234.4,178.5a6,6,0,0,1-4.8,11l-23.23-10.15a86,86,0,0,1-156.74,0L26.4,189.5a6,6,0,1,1-4.8-11l23.85-10.42A85.88,85.88,0,0,1,42,144V134H16a6,6,0,0,1,0-12H42V112a85.88,85.88,0,0,1,3.45-24.08L21.6,77.5a6,6,0,0,1,4.8-11L49.63,76.65a86,86,0,0,1,156.74,0L229.6,66.5a6,6,0,1,1,4.8,11L210.55,87.92A85.88,85.88,0,0,1,214,112v10h26A6,6,0,0,1,246,128ZM54,122H202V112a74,74,0,0,0-148,0Zm68,95.74V134H54v10A74.09,74.09,0,0,0,122,217.74ZM202,134H134v83.74A74.09,74.09,0,0,0,202,144Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M148,92a8,8,0,1,1,8,8A8,8,0,0,1,148,92Zm-48-8a8,8,0,1,0,8,8A8,8,0,0,0,100,84Zm144,44a4,4,0,0,1-4,4H212v12a83.64,83.64,0,0,1-3.87,25.2l25.47,11.13A4,4,0,0,1,232,188a4.09,4.09,0,0,1-1.6-.33l-25-10.95a84,84,0,0,1-154.72,0l-25,10.95A4.09,4.09,0,0,1,24,188a4,4,0,0,1-1.6-7.67L47.87,169.2A83.64,83.64,0,0,1,44,144V132H16a4,4,0,0,1,0-8H44V112a83.64,83.64,0,0,1,3.87-25.2L22.4,75.67a4,4,0,0,1,3.2-7.34l25,11a84,84,0,0,1,154.72,0l25-11a4,4,0,1,1,3.2,7.34L208.13,86.8A83.64,83.64,0,0,1,212,112v12h28A4,4,0,0,1,244,128ZM52,124H204V112a76,76,0,0,0-152,0Zm72,95.89V132H52v12A76.09,76.09,0,0,0,124,219.89ZM204,132H132v87.89A76.09,76.09,0,0,0,204,144Z"}))]]),VL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,208a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V48a12,12,0,0,1,24,0v85.55L88.1,95a12,12,0,0,1,15.1-.57l56.22,42.16L216.1,87A12,12,0,1,1,231.9,105l-64,56a12,12,0,0,1-15.1.57L96.58,119.44,44,165.45V196H224A12,12,0,0,1,236,208Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,64V208H32V48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),d.createElement("path",{d:"M232,208a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V48a8,8,0,0,1,16,0v94.37L90.73,98a8,8,0,0,1,10.07-.38l58.81,44.11L218.73,90a8,8,0,1,1,10.54,12l-64,56a8,8,0,0,1-10.07.38L96.39,114.29,40,163.63V200H224A8,8,0,0,1,232,208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM200,176a8,8,0,0,1,0,16H56a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v62.92l34.88-29.07a8,8,0,0,1,9.56-.51l43,28.69,43.41-36.18a8,8,0,0,1,10.24,12.3l-48,40a8,8,0,0,1-9.56.51l-43-28.69L64,155.75V176Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230,208a6,6,0,0,1-6,6H32a6,6,0,0,1-6-6V48a6,6,0,0,1,12,0v98.78l54.05-47.3a6,6,0,0,1,7.55-.28l60.11,45.08,60.34-52.8a6,6,0,0,1,7.9,9l-64,56a6,6,0,0,1-7.55.28L96.29,111.72,38,162.72V202H224A6,6,0,0,1,230,208Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,208a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V48a8,8,0,0,1,16,0v94.37L90.73,98a8,8,0,0,1,10.07-.38l58.81,44.11L218.73,90a8,8,0,1,1,10.54,12l-64,56a8,8,0,0,1-10.07.38L96.39,114.29,40,163.63V200H224A8,8,0,0,1,232,208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,208a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V48a4,4,0,0,1,8,0V151.19L93.37,101a4,4,0,0,1,5-.19l61.41,46.05L221.37,93a4,4,0,0,1,5.26,6l-64,56a4,4,0,0,1-5,.19l-61.41-46L36,161.81V204H224A4,4,0,0,1,228,208Z"}))]]),UL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,128a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm32-16a16,16,0,1,0,16,16A16,16,0,0,0,152,112Zm84,16A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z"}))]]),ZL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),WL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),qL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),GL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M225.15,197.71,164,95.81V44h4a12,12,0,0,0,0-24H88a12,12,0,0,0,0,24h4V95.81L30.85,197.71A20,20,0,0,0,48,228H208a20,20,0,0,0,17.15-30.29ZM140,44V99.14a12,12,0,0,0,1.71,6.17l35.13,58.54c-10.79.86-25.15-1.31-43.42-10.56-14-7.08-27.46-11.33-40.27-12.76l21.14-35.22A12,12,0,0,0,116,99.14V44ZM55.06,204,79,164.19c13-1.11,27.62,2.42,43.62,10.52,19.61,9.92,36.25,13.31,49.85,13.31A75.44,75.44,0,0,0,190.11,186l10.83,18Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,216H48a8,8,0,0,1-6.86-12.12l30.48-50.8h0c13.23-2.48,32-1.41,56.37,10.92,32.25,16.33,54.75,12.91,67.5,7.65h0l19.34,32.23A8,8,0,0,1,208,216Z",opacity:"0.2"}),d.createElement("path",{d:"M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23ZM110.86,103.25A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167c-12,2.37-29.07,1.37-51.75-10.11-15.91-8.05-31.05-12.32-45.22-12.81ZM48,208l28.54-47.58c14.25-1.73,30.31,1.85,47.82,10.72,19,9.61,35,12.88,48,12.88a69.89,69.89,0,0,0,19.55-2.7L208,208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23Zm-90.08-42.91c-15.91-8.05-31.05-12.32-45.22-12.81l24.47-40.8A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167C171.4,169.34,154.29,168.34,131.61,156.86Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,200.8,158,97.48V38h10a6,6,0,0,0,0-12H88a6,6,0,0,0,0,12H98V97.48L36,200.8A14,14,0,0,0,48,222H208a14,14,0,0,0,12-21.2ZM109.15,102.23a6,6,0,0,0,.85-3.09V38h36V99.14a6,6,0,0,0,.85,3.09l39.65,66.08c-12.41,3.16-30.86,3-55.79-9.66-16.94-8.58-33-12.8-47.83-12.64ZM209.72,209a2,2,0,0,1-1.74,1H48a2,2,0,0,1-1.71-3l29-48.41c14.89-2.08,31.68,1.55,49.94,10.79C144,178.8,159.67,182,172.42,182A67.89,67.89,0,0,0,192.89,179l16.8,28A2,2,0,0,1,209.72,209Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23ZM110.86,103.25A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167c-12,2.37-29.07,1.37-51.75-10.11-15.91-8.05-31.05-12.32-45.22-12.81ZM48,208l28.54-47.58c14.25-1.74,30.31,1.85,47.82,10.72,19,9.61,35,12.88,48,12.88a69.89,69.89,0,0,0,19.55-2.7L208,208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M218.27,201.83,156,98V36h12a4,4,0,0,0,0-8H88a4,4,0,0,0,0,8h12V98L37.73,201.83A12,12,0,0,0,48,220H208a12,12,0,0,0,10.29-18.17ZM107.43,101.2a4.07,4.07,0,0,0,.57-2.06V36h40V99.14a4.07,4.07,0,0,0,.57,2.06l41,68.33c-12.76,3.94-32.54,4.68-59.75-9.1-18-9.14-35-13.24-50.54-12.29ZM211.46,210a3.94,3.94,0,0,1-3.48,2H48a4,4,0,0,1-3.43-6.06l29.53-49.21c15.54-2.43,33.05,1.21,52.07,10.84C144.54,176.86,160,180,172.42,180a65,65,0,0,0,21.36-3.46l17.63,29.38A3.92,3.92,0,0,1,211.46,210Z"}))]]),KL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),QL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180,232a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h80A12,12,0,0,1,180,232Zm40-128a91.51,91.51,0,0,1-35.17,72.35A12.26,12.26,0,0,0,180,186v2a20,20,0,0,1-20,20H96a20,20,0,0,1-20-20v-2a12,12,0,0,0-4.7-9.51A91.57,91.57,0,0,1,36,104.52C35.73,54.69,76,13.2,125.79,12A92,92,0,0,1,220,104Zm-24,0a68,68,0,0,0-69.65-68C89.56,36.88,59.8,67.55,60,104.38a67.71,67.71,0,0,0,26.1,53.19A35.87,35.87,0,0,1,100,184h56.1A36.13,36.13,0,0,1,170,157.49,67.68,67.68,0,0,0,196,104Zm-20.07-5.32a48.5,48.5,0,0,0-31.91-40,12,12,0,0,0-8,22.62,24.31,24.31,0,0,1,16.09,20,12,12,0,0,0,23.86-2.64Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,104a79.86,79.86,0,0,1-30.59,62.92A24.29,24.29,0,0,0,168,186v6a8,8,0,0,1-8,8H96a8,8,0,0,1-8-8v-6a24.11,24.11,0,0,0-9.3-19A79.87,79.87,0,0,1,48,104.45C47.76,61.09,82.72,25,126.07,24A80,80,0,0,1,208,104Z",opacity:"0.2"}),d.createElement("path",{d:"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-32.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M174,232a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h80A6,6,0,0,1,174,232Zm40-128a85.56,85.56,0,0,1-32.88,67.64A18.23,18.23,0,0,0,174,186v6a14,14,0,0,1-14,14H96a14,14,0,0,1-14-14v-6a18,18,0,0,0-7-14.23h0a85.59,85.59,0,0,1-33-67.24C41.74,57.91,79.39,19.12,125.93,18A86,86,0,0,1,214,104Zm-12,0a74,74,0,0,0-75.79-74C86.17,31,53.78,64.34,54,104.42a73.67,73.67,0,0,0,28.4,57.87A29.92,29.92,0,0,1,94,186v6a2,2,0,0,0,2,2h64a2,2,0,0,0,2-2v-6a30.18,30.18,0,0,1,11.7-23.78A73.59,73.59,0,0,0,202,104Zm-20.08-9A55.58,55.58,0,0,0,137,50.08a6,6,0,1,0-2,11.84C152.38,64.84,167.13,79.6,170.08,97a6,6,0,0,0,5.91,5,6.87,6.87,0,0,0,1-.08A6,6,0,0,0,181.92,95Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172,232a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h80A4,4,0,0,1,172,232Zm40-128a83.59,83.59,0,0,1-32.11,66.06A20.2,20.2,0,0,0,172,186v6a12,12,0,0,1-12,12H96a12,12,0,0,1-12-12v-6a20,20,0,0,0-7.76-15.81A83.58,83.58,0,0,1,44,104.47C43.75,59,80.52,21.09,126,20a84,84,0,0,1,86,84Zm-8,0a76,76,0,0,0-77.83-76C85,29,51.77,63.27,52,104.43a75.62,75.62,0,0,0,29.17,59.43A28,28,0,0,1,92,186v6a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4v-6a28.14,28.14,0,0,1,10.94-22.2A75.62,75.62,0,0,0,204,104ZM136.66,52.06a4,4,0,0,0-1.32,7.88C153.53,63,169,78.45,172.06,96.67A4,4,0,0,0,176,100a3.88,3.88,0,0,0,.67-.06,4,4,0,0,0,3.27-4.61A53.51,53.51,0,0,0,136.66,52.06Z"}))]]),YL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),XL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),d.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),JL=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM93,180l71-71,11,11-71,71ZM76,163,65,152l71-71,11,11ZM52,173l15.51,15.51h0L83,204H52ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM51.31,160,136,75.31,152.69,92,68,176.68ZM48,179.31,76.69,208H48Zm48,25.38L79.31,188,164,103.31,180.69,120Zm96-96L147.31,64l24-24L216,84.68Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM51.31,160l90.35-90.35,16.68,16.69L68,176.68ZM48,179.31,76.69,208H48Zm48,25.38L79.31,188l90.35-90.35h0l16.68,16.69Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM48.49,160,136,72.48,155.51,92,68,179.51ZM46,208V174.48L81.51,210H48A2,2,0,0,1,46,208Zm50-.49L76.49,188,164,100.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM51.31,160,136,75.31,152.69,92,68,176.68ZM48,179.31,76.69,208H48Zm48,25.38L79.31,188,164,103.31,180.69,120Zm96-96L147.31,64l24-24L216,84.68Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17ZM45.66,160,136,69.65,158.34,92,68,182.34ZM44,208V169.66l21.17,21.17h0L86.34,212H48A4,4,0,0,1,44,208Zm52,2.34L73.66,188,164,97.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),eF=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z",opacity:"0.2"}),d.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z"}))]]),tF=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm84,108a83.6,83.6,0,0,1-16.75,50.28L77.72,60.75A84,84,0,0,1,212,128ZM44,128A83.6,83.6,0,0,1,60.75,77.72L178.28,195.25A84,84,0,0,1,44,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.56,87.56,0,0,1-20.41,56.28L71.72,60.4A88,88,0,0,1,216,128ZM40,128A87.56,87.56,0,0,1,60.41,71.72L184.28,195.6A88,88,0,0,1,40,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,128a71.69,71.69,0,0,1-15.78,44.91L83.09,71.78A71.95,71.95,0,0,1,200,128ZM56,128a71.95,71.95,0,0,0,116.91,56.22L71.78,83.09A71.69,71.69,0,0,0,56,128Zm180,0A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-20,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm90,102a89.6,89.6,0,0,1-22.29,59.22L68.78,60.29A89.95,89.95,0,0,1,218,128ZM38,128A89.6,89.6,0,0,1,60.29,68.78L187.22,195.71A89.95,89.95,0,0,1,38,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.56,87.56,0,0,1-20.41,56.28L71.72,60.4A88,88,0,0,1,216,128ZM40,128A87.56,87.56,0,0,1,60.41,71.72L184.28,195.6A88,88,0,0,1,40,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm92,100a91.67,91.67,0,0,1-24.21,62.13L65.87,60.21A92,92,0,0,1,220,128ZM36,128A91.67,91.67,0,0,1,60.21,65.87L190.13,195.79A92,92,0,0,1,36,128Z"}))]]),nF=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M144,180a16,16,0,1,1-16-16A16,16,0,0,1,144,180Zm92-52A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128ZM128,64c-24.26,0-44,17.94-44,40v4a12,12,0,0,0,24,0v-4c0-8.82,9-16,20-16s20,7.18,20,16-9,16-20,16a12,12,0,0,0-12,12v8a12,12,0,0,0,23.73,2.56C158.31,137.88,172,122.37,172,104,172,81.94,152.26,64,128,64Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M138,180a10,10,0,1,1-10-10A10,10,0,0,1,138,180ZM128,74c-21,0-38,15.25-38,34v4a6,6,0,0,0,12,0v-4c0-12.13,11.66-22,26-22s26,9.87,26,22-11.66,22-26,22a6,6,0,0,0-6,6v8a6,6,0,0,0,12,0v-2.42c18.11-2.58,32-16.66,32-33.58C166,89.25,149,74,128,74Zm102,54A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M136,180a8,8,0,1,1-8-8A8,8,0,0,1,136,180ZM128,76c-19.85,0-36,14.36-36,32v4a4,4,0,0,0,8,0v-4c0-13.23,12.56-24,28-24s28,10.77,28,24-12.56,24-28,24a4,4,0,0,0-4,4v8a4,4,0,0,0,8,0v-4.2c18-1.77,32-15.36,32-31.8C164,90.36,147.85,76,128,76Zm100,52A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),rF=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M72,104a16,16,0,1,1,16,16A16,16,0,0,1,72,104Zm96,16a16,16,0,1,0-16-16A16,16,0,0,0,168,120Zm68-40V192a36,36,0,0,1-36,36H56a36,36,0,0,1-36-36V80A36,36,0,0,1,56,44h60V16a12,12,0,0,1,24,0V44h60A36,36,0,0,1,236,80Zm-24,0a12,12,0,0,0-12-12H56A12,12,0,0,0,44,80V192a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12Zm-12,82a30,30,0,0,1-30,30H86a30,30,0,0,1,0-60h84A30,30,0,0,1,200,162Zm-80-6v12h16V156ZM86,168H96V156H86a6,6,0,0,0,0,12Zm90-6a6,6,0,0,0-6-6H160v12h10A6,6,0,0,0,176,162Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56H56A24,24,0,0,0,32,80V192a24,24,0,0,0,24,24H200a24,24,0,0,0,24-24V80A24,24,0,0,0,200,56ZM164,184H92a20,20,0,0,1,0-40h72a20,20,0,0,1,0,40Z",opacity:"0.2"}),d.createElement("path",{d:"M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Zm4,28H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48ZM172,96a12,12,0,1,1-12,12A12,12,0,0,1,172,96ZM96,184H80a16,16,0,0,1,0-32H96ZM84,120a12,12,0,1,1,12-12A12,12,0,0,1,84,120Zm60,64H112V152h32Zm32,0H160V152h16a16,16,0,0,1,0,32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,50H134V16a6,6,0,0,0-12,0V50H56A30,30,0,0,0,26,80V192a30,30,0,0,0,30,30H200a30,30,0,0,0,30-30V80A30,30,0,0,0,200,50Zm18,142a18,18,0,0,1-18,18H56a18,18,0,0,1-18-18V80A18,18,0,0,1,56,62H200a18,18,0,0,1,18,18ZM74,108a10,10,0,1,1,10,10A10,10,0,0,1,74,108Zm88,0a10,10,0,1,1,10,10A10,10,0,0,1,162,108Zm2,30H92a26,26,0,0,0,0,52h72a26,26,0,0,0,0-52Zm-22,12v28H114V150ZM78,164a14,14,0,0,1,14-14h10v28H92A14,14,0,0,1,78,164Zm86,14H154V150h10a14,14,0,0,1,0,28Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,52H132V16a4,4,0,0,0-8,0V52H56A28,28,0,0,0,28,80V192a28,28,0,0,0,28,28H200a28,28,0,0,0,28-28V80A28,28,0,0,0,200,52Zm20,140a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V80A20,20,0,0,1,56,60H200a20,20,0,0,1,20,20ZM76,108a8,8,0,1,1,8,8A8,8,0,0,1,76,108Zm88,0a8,8,0,1,1,8,8A8,8,0,0,1,164,108Zm0,32H92a24,24,0,0,0,0,48h72a24,24,0,0,0,0-48Zm-20,8v32H112V148ZM76,164a16,16,0,0,1,16-16h12v32H92A16,16,0,0,1,76,164Zm88,16H152V148h12a16,16,0,0,1,0,32Z"}))]]),sF=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M248.92,104,215.3,66.62A20,20,0,0,0,200.44,60H140V32a12,12,0,0,0-24,0V60H40A20,20,0,0,0,20,80v64a20,20,0,0,0,20,20h76v60a12,12,0,0,0,24,0V164h60.44a20,20,0,0,0,14.86-6.62L248.92,120A12,12,0,0,0,248.92,104Zm-50.26,36H44V84H198.66l25.2,28Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,112l-33.62,37.35a8,8,0,0,1-5.94,2.65H40a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H200.44a8,8,0,0,1,5.94,2.65Z",opacity:"0.2"}),d.createElement("path",{d:"M246,106.65,212.33,69.3A16,16,0,0,0,200.44,64H136V32a8,8,0,0,0-16,0V64H40A16,16,0,0,0,24,80v64a16,16,0,0,0,16,16h80v64a8,8,0,0,0,16,0V160h64.44a16,16,0,0,0,11.89-5.3L246,117.35A8,8,0,0,0,246,106.65ZM200.44,144H40V80H200.44l28.8,32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M246,117.35,212.33,154.7a16,16,0,0,1-11.89,5.3H136v64a8,8,0,0,1-16,0V160H40a16,16,0,0,1-16-16V80A16,16,0,0,1,40,64h80V32a8,8,0,0,1,16,0V64h64.44a16,16,0,0,1,11.89,5.3L246,106.65A8,8,0,0,1,246,117.35Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M244.46,108,210.84,70.63A14,14,0,0,0,200.44,66H134V32a6,6,0,0,0-12,0V66H40A14,14,0,0,0,26,80v64a14,14,0,0,0,14,14h82v66a6,6,0,0,0,12,0V158h66.44a14,14,0,0,0,10.4-4.63L244.46,116A6,6,0,0,0,244.46,108Zm-42.54,37.35a2,2,0,0,1-1.48.66H40a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2H200.44a2,2,0,0,1,1.48.66l30,33.34Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M246,106.65,212.33,69.3A16,16,0,0,0,200.44,64H136V32a8,8,0,0,0-16,0V64H40A16,16,0,0,0,24,80v64a16,16,0,0,0,16,16h80v64a8,8,0,0,0,16,0V160h64.44a16,16,0,0,0,11.89-5.3L246,117.35A8,8,0,0,0,246,106.65ZM200.44,144H40V80H200.44l28.8,32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M243,109.32,209.36,72a12.06,12.06,0,0,0-8.92-4H132V32a4,4,0,0,0-8,0V68H40A12,12,0,0,0,28,80v64a12,12,0,0,0,12,12h84v68a4,4,0,0,0,8,0V156h68.44a12.06,12.06,0,0,0,8.92-4L243,114.68A4,4,0,0,0,243,109.32Zm-39.56,37.36a4,4,0,0,1-3,1.32H40a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H200.44a4,4,0,0,1,3,1.32L234.62,112Z"}))]]),iF=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.47,67.5a12,12,0,0,0-19.26-4.32L172.43,99l-12.68-2.72L157,83.57l35.79-38.78a12,12,0,0,0-4.32-19.26A76.07,76.07,0,0,0,88.41,121.64L30.92,174.18a4.68,4.68,0,0,0-.39.38,36,36,0,0,0,50.91,50.91l.38-.39,52.54-57.49A76.05,76.05,0,0,0,230.47,67.5ZM160,148a51.5,51.5,0,0,1-23.35-5.52,12,12,0,0,0-14.26,2.62L64.31,208.66a12,12,0,0,1-17-17l63.55-58.07a12,12,0,0,0,2.62-14.26A51.5,51.5,0,0,1,108,96a52.06,52.06,0,0,1,52-52h.89L135.17,71.87a12,12,0,0,0-2.91,10.65l5.66,26.35a12,12,0,0,0,9.21,9.21l26.35,5.66a12,12,0,0,0,10.65-2.91L212,95.12c0,.3,0,.59,0,.89A52.06,52.06,0,0,1,160,148Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,96a64,64,0,0,1-94.94,56L73,217A24,24,0,0,1,39,183L104,126.94a64,64,0,0,1,80-90.29L144,80l5.66,26.34L176,112l43.35-40A63.8,63.8,0,0,1,224,96Z",opacity:"0.2"}),d.createElement("path",{d:"M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,96a72,72,0,0,1-100.94,66L79,222.22c-.12.14-.26.29-.39.42a32,32,0,0,1-45.26-45.26c.14-.13.28-.27.43-.39L94,124.94a72.07,72.07,0,0,1,83.54-98.78,8,8,0,0,1,3.93,13.19L144,80l5.66,26.35L176,112l40.65-37.52a8,8,0,0,1,13.19,3.93A72.6,72.6,0,0,1,232,96Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.91,69.75a6,6,0,0,0-9.63-2.16l-41.07,37.9L154.7,101.3l-4.19-19.51,37.9-41.07a6,6,0,0,0-2.16-9.63,70,70,0,0,0-89.77,94.39l-61.39,53c-.11.09-.21.19-.32.3A30,30,0,0,0,77.2,221.23c.11-.11.21-.21.3-.32l53-61.39a70,70,0,0,0,94.39-89.77ZM160,154a58,58,0,0,1-28-7.22,6,6,0,0,0-7.45,1.33L68.57,212.88a18,18,0,0,1-25.45-25.45l64.76-55.94A6,6,0,0,0,109.2,124a58,58,0,0,1,64-84.53L139.58,75.93a6,6,0,0,0-1.45,5.33l5.65,26.35a6,6,0,0,0,4.61,4.61l26.35,5.65a6,6,0,0,0,5.33-1.45L216.49,82.8A58.06,58.06,0,0,1,160,154Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M223.05,70.5a4,4,0,0,0-6.42-1.44l-41.82,38.6L153,103l-4.68-21.79,38.6-41.82a4,4,0,0,0-1.44-6.43A68,68,0,0,0,98.94,126L36.4,180l-.21.2a28,28,0,0,0,39.6,39.6l.2-.21,54-62.54A68,68,0,0,0,228,96,67.51,67.51,0,0,0,223.05,70.5ZM160,156a60,60,0,0,1-29-7.47,4,4,0,0,0-5,.89L70,214.25A20,20,0,0,1,41.75,186l64.82-56a4,4,0,0,0,.89-5,60,60,0,0,1,69.46-86.59L141.05,77.29a4,4,0,0,0-1,3.55l5.66,26.35a4,4,0,0,0,3.07,3.07l26.35,5.66a4,4,0,0,0,3.55-1l38.87-35.87A60.05,60.05,0,0,1,160,156Z"}))]]),oF=d.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),At=d.forwardRef((e,t)=>{const{alt:n,color:s,size:o,weight:l,mirrored:c,children:f,weights:p,...m}=e,{color:h="currentColor",size:g,weight:y="regular",mirrored:b=!1,...k}=d.useContext(oF);return d.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??g,height:o??g,fill:s??h,viewBox:"0 0 256 256",transform:c||b?"scale(-1, 1)":void 0,...k,...m},!!n&&d.createElement("title",null,n),f,p.get(l??y))});At.displayName="IconBase";const v4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:OL}));v4.displayName="ArrowBendUpRightIcon";const aF=v4,b4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:DL}));b4.displayName="ArrowRightIcon";const lF=b4,w4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:zL}));w4.displayName="ArrowsClockwiseIcon";const cF=w4,k4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:$L}));k4.displayName="ArrowsSplitIcon";const uF=k4,S4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:HL}));S4.displayName="BookOpenIcon";const dF=S4,C4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:BL}));C4.displayName="BugIcon";const fF=C4,j4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:VL}));j4.displayName="ChartLineIcon";const pF=j4,E4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:UL}));E4.displayName="ChatCircleDotsIcon";const mF=E4,N4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:ZL}));N4.displayName="CheckCircleIcon";const hF=N4,A4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:WL}));A4.displayName="EyeSlashIcon";const gF=A4,R4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:qL}));R4.displayName="FileTextIcon";const xF=R4,T4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:GL}));T4.displayName="FlaskIcon";const yF=T4,I4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:KL}));I4.displayName="GlobeIcon";const vF=I4,P4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:QL}));P4.displayName="LightbulbIcon";const bF=P4,M4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:YL}));M4.displayName="LightningIcon";const wF=M4,_4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:XL}));_4.displayName="MagnifyingGlassIcon";const kF=_4,L4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:JL}));L4.displayName="PencilIcon";const SF=L4,F4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:eF}));F4.displayName="PlayIcon";const CF=F4,O4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:tF}));O4.displayName="ProhibitIcon";const jF=O4,D4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:nF}));D4.displayName="QuestionIcon";const EF=D4,z4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:rF}));z4.displayName="RobotIcon";const NF=z4,$4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:sF}));$4.displayName="SignpostIcon";const AF=$4,H4=d.forwardRef((e,t)=>d.createElement(At,{ref:t,...e,weights:iF}));H4.displayName="WrenchIcon";const RF=H4,TF={"alert-circle":Yp,"arrow-right":gc,bug:op,"check-circle":ha,circle:As,database:QC,"git-branch":o1,hammer:cj,"help-circle":s1,lightbulb:xa,"message-circle":l1,sparkles:ya,table:c1,trash:eE,wrench:u1,"lucide-bug":op,"lucide-check-circle":ha,"lucide-git-branch":o1,"lucide-help-circle":s1,"lucide-message-circle":l1,"lucide-sparkles":ya,"lucide-table":c1,"lucide-wrench":u1},IF={"arrow-bend-up-right":aF,"arrow-right":lF,"arrows-clockwise":cF,"arrows-split":uF,"book-open":dF,bug:fF,"chart-line":pF,"chat-circle-dots":mF,"check-circle":hF,"eye-slash":gF,"file-text":xF,flask:yF,globe:vF,lightbulb:bF,lightning:wF,"magnifying-glass":kF,pencil:SF,play:CF,prohibit:jF,question:EF,robot:NF,signpost:AF,wrench:RF};function We({name:e,size:t=14,className:n=""}){if(!e)return null;if(e.startsWith("ph:")){const o=e.slice(3),l=IF[o];return l?a.jsx(l,{size:t,className:n}):null}const s=TF[e];return s?a.jsx(s,{size:t,className:n}):null}const Vf={sky:{border:"border-sky-500/50",bg:"bg-sky-500/5",text:"text-sky-400",icon:"text-sky-400"},purple:{border:"border-purple-500/50",bg:"bg-purple-500/5",text:"text-purple-400",icon:"text-purple-400"},rose:{border:"border-rose-500/50",bg:"bg-rose-500/5",text:"text-rose-400",icon:"text-rose-400"},orange:{border:"border-orange-500/50",bg:"bg-orange-500/5",text:"text-orange-400",icon:"text-orange-400"},emerald:{border:"border-emerald-500/50",bg:"bg-emerald-500/5",text:"text-emerald-400",icon:"text-emerald-400"},amber:{border:"border-amber-500/50",bg:"bg-amber-500/5",text:"text-amber-400",icon:"text-amber-400"},red:{border:"border-red-500/50",bg:"bg-red-500/5",text:"text-red-400",icon:"text-red-400"},teal:{border:"border-teal-500/50",bg:"bg-teal-500/5",text:"text-teal-400",icon:"text-teal-400"},blue:{border:"border-blue-500/50",bg:"bg-blue-500/5",text:"text-blue-400",icon:"text-blue-400"},fuchsia:{border:"border-fuchsia-500/50",bg:"bg-fuchsia-500/5",text:"text-fuchsia-400",icon:"text-fuchsia-400"},slate:{border:"border-border/30",bg:"bg-card/20",text:"text-muted-foreground/50",icon:"text-muted-foreground/50"}};function hn(e){return e&&e in Vf?Vf[e]:Vf.slate}function PF(e,t=12){switch(e){case"User":return{icon:a.jsx(k2,{size:t}),color:"text-indigo-400"};case"Response":return{icon:a.jsx(wj,{size:t}),color:"text-slate-400"};case"Read":return{icon:a.jsx(eo,{size:t}),color:"text-sky-400"};case"Edit":case"MultiEdit":return{icon:a.jsx(nm,{size:t}),color:"text-amber-400"};case"Write":return{icon:a.jsx(Xp,{size:t}),color:"text-emerald-400"};case"Bash":return{icon:a.jsx(Qc,{size:t}),color:"text-violet-400"};case"Grep":case"Glob":return{icon:a.jsx(ii,{size:t}),color:"text-orange-400"};case"LS":return{icon:a.jsx(qc,{size:t}),color:"text-orange-400"};case"TodoRead":case"TodoWrite":return{icon:a.jsx(j2,{size:t}),color:"text-blue-400"};case"WebSearch":return{icon:a.jsx(Jp,{size:t}),color:"text-cyan-400"};case"WebFetch":return{icon:a.jsx(ga,{size:t}),color:"text-cyan-400"};case"Task":return{icon:a.jsx(em,{size:t}),color:"text-purple-400"};default:return{icon:a.jsx(tm,{size:t}),color:"text-zinc-400"}}}function MF(e){const n=Date.now()-e,s=Math.floor(n/1e3),o=Math.floor(s/60),l=Math.floor(o/60),c=Math.floor(l/24);return s<60?`${s}s`:o<60?`${o}m`:l<24?`${l}h`:`${c}d`}function _F({actions:e,maxHeight:t=100}){return e.length===0?a.jsxs("div",{className:"mt-4 w-[100px]",children:[a.jsx("div",{className:"text-[9px] uppercase tracking-wider text-muted-foreground/30 font-semibold mb-1.5",children:"Actions"}),a.jsx("div",{className:"text-[10px] text-muted-foreground/40 italic",children:"No actions yet"})]}):a.jsxs("div",{className:"mt-4 w-[100px] flex flex-col",children:[a.jsx("div",{className:"text-[9px] uppercase tracking-wider text-muted-foreground/30 font-semibold mb-1.5",children:"Actions"}),a.jsx("div",{className:"flex flex-col gap-0.5",children:e.map((n,s)=>{let o=1;s===0?o=.3:s===1?o=.5:s===2&&(o=.7);const l=s===e.length-1,c=PF(n.tool,11);return a.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] py-0.5 transition-opacity duration-300",style:{opacity:o},children:[a.jsx("div",{className:`flex-shrink-0 ${c.color}`,children:c.icon}),a.jsx("span",{className:`truncate font-medium ${c.color}`,children:n.tool}),l&&a.jsx("span",{className:"text-[9px] text-muted-foreground/50 ml-auto",children:MF(n.timestamp)})]},`${n.tool}-${n.timestamp}-${s}`)})})]})}function LF(e){const t=e.split(`
|
|
135
|
+
`).map(c=>c.trim()).filter(Boolean),n=/^[•\-\*]\s*/,s=new RegExp("^(\\p{Emoji})\\s*","u"),o=t.map(c=>c.replace(n,"")),l=t.length>1&&t.some(c=>n.test(c)||s.test(c));return{lines:o,isBulleted:l}}function B4({content:e,textSize:t="text-sm",className:n=""}){const{lines:s,isBulleted:o}=LF(e),l=new RegExp("^(\\p{Emoji})\\s*","u");return!o||s.length===1?a.jsx("div",{className:`${t} text-foreground/80 leading-relaxed ${n}`,children:s.join(" ")}):a.jsx("div",{className:`${t} text-foreground/80 leading-relaxed space-y-1 ${n}`,children:s.map((c,f)=>{const p=c.match(l);if(p){const m=p[1],h=c.replace(l,"");return a.jsxs("div",{className:"flex items-start gap-1.5",children:[a.jsx("span",{className:"flex-shrink-0 w-4 text-center",children:m}),a.jsx("span",{children:h})]},f)}else return a.jsxs("div",{className:"flex items-start gap-1.5",children:[a.jsx("span",{className:"flex-shrink-0 w-4 text-center text-muted-foreground/40",children:"•"}),a.jsx("span",{children:c})]},f)})})}function FF({id:e,title:t,timestamp:n,createdAt:s,projectPath:o,recentDirectories:l,status:c,liveStatus:f,insights:p,identityImage:m,recentActions:h=[],isArchived:g=!1,isPinned:y=!1,onClick:b,onCancel:k,onForceKill:w,onInjectMessage:S,onArchive:j,onUnarchive:E}){const[N,M]=d.useState(!1),[,_]=d.useState(0),R=d.useRef(null),P=d.useRef(null),L=d.useRef(null),G=p?.patchedAt||p?.computedAt;d.useEffect(()=>{if(!G)return;const oe=()=>Math.floor((Date.now()-new Date(G).getTime())/1e3);let ce;const re=()=>{const be=oe()<60?1e3:1e4;ce=setTimeout(()=>{_(Pe=>Pe+1),re()},be)};return re(),()=>clearTimeout(ce)},[G]);const D=oe=>{const ce=new Date(oe),ge=new Date().getTime()-ce.getTime(),be=Math.floor(ge/6e4),Pe=Math.floor(be/60),Ze=Math.floor(Pe/24);return be<1?"now":be<60?`${be}m`:Pe<24?`${Pe}h`:Ze<7?`${Ze}d`:ce.toLocaleDateString()},B=oe=>{if(!oe)return null;const ce=Math.floor((Date.now()-new Date(oe).getTime())/1e3);if(ce<5)return"just now";if(ce<60)return`${ce}s ago`;const re=Math.floor(ce/60);if(re<60)return`${re}m ago`;const ge=Math.floor(re/60);return ge<24?`${ge}h ago`:`${Math.floor(ge/24)}d ago`},Y=!o||o==="~"||/^\/(?:home|Users)\/[^/]+\/?$/.test(o)?null:l[o]?.shortname||o.split("/").pop()||null,Q=c==="ongoing",F=p?.context,Z=p?.currentState,K=p?.milestones||[];p?.recentActions;const O=p?.notable||[],J=p?.tags,T=p?.panels||[],z=p?.theme,H=F?.mission||p?.purposes?.[0]||p?.description||t||"New conversation";F&&[F.project,F.area].filter(Boolean).join(" › ");const I=p?.currentTask,ie=p?.outstanding||[],se=F!==null||Z!==null||K.length>0||O.length>0||T.length>0,le=!m&&!g,te=oe=>{switch(oe){case"error":return a.jsx(Yp,{size:12,className:"text-red-400"});case"fix":return a.jsx($n,{size:12,className:"text-green-400"});case"blocker":return a.jsx(xc,{size:12,className:"text-amber-400"});case"correction":return a.jsx(yc,{size:12,className:"text-blue-400"});case"decision":return a.jsx(C2,{size:12,className:"text-purple-400"});case"breakthrough":return a.jsx(va,{size:12,className:"text-yellow-400"});case"iteration":return a.jsx(As,{size:12,className:"text-muted-foreground"});case"insight":return a.jsx(xa,{size:12,className:"text-yellow-300"});case"pivot":return a.jsx(yc,{size:12,className:"text-purple-400"});case"infrastructure":return a.jsx(xc,{size:12,className:"text-slate-400"});case"refinement":return a.jsx(As,{size:12,className:"text-blue-400"});case"validation":return a.jsx($n,{size:12,className:"text-emerald-400"});default:return a.jsx(xa,{size:12,className:"text-muted-foreground"})}};return a.jsxs("div",{className:"relative group",onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[a.jsx("a",{className:"block no-underline text-inherit",onClick:oe=>{oe.metaKey||oe.ctrlKey||(oe.preventDefault(),b())},href:`/c/${e}`,children:a.jsxs("div",{className:`flex overflow-hidden transition-colors duration-150 ${N?"bg-card/80":""}`,children:[m?a.jsxs("div",{className:"hidden sm:flex pl-3 py-[17px] flex-shrink-0 flex-col",children:[a.jsx("div",{className:"w-16 sm:w-20 h-[120px] sm:h-[150px] bg-cover bg-center rounded-md border border-border/50 shadow-md shadow-black/40",style:{backgroundImage:`url(data:image/jpeg;base64,${m})`}}),!g&&h.length>0&&a.jsx(_F,{actions:h})]}):le?a.jsxs("div",{className:"hidden sm:flex pl-3 py-[17px] flex-shrink-0 flex-col",children:[a.jsx("div",{className:"w-16 sm:w-20 h-[120px] sm:h-[150px] rounded-md border border-border/30 bg-gradient-to-br from-muted/20 to-muted/5 animate-pulse"}),a.jsxs("div",{className:"mt-4 w-[100px]",children:[a.jsx("div",{className:"text-[9px] uppercase tracking-wider text-muted-foreground/20 font-semibold mb-1.5",children:"Actions"}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("div",{className:"h-3 w-16 bg-muted/20 rounded animate-pulse"}),a.jsx("div",{className:"h-3 w-12 bg-muted/15 rounded animate-pulse"}),a.jsx("div",{className:"h-3 w-14 bg-muted/10 rounded animate-pulse"})]})]})]}):null,a.jsxs("div",{className:"flex-1 min-w-0 px-4 pt-4 pb-6",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[a.jsx("div",{className:"flex items-start gap-2 min-w-0 flex-1",children:a.jsxs("div",{className:"min-w-0 flex-1",children:[(F?.project||Y)&&a.jsxs("div",{className:"text-[11px] text-muted-foreground/50 uppercase tracking-wider mb-1 truncate",children:[a.jsx("span",{children:F?.project||Y}),F?.area&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-muted-foreground/30 mx-1.5",children:"›"}),a.jsx("span",{children:F.area})]})]}),a.jsx("div",{className:"text-base text-foreground font-semibold line-clamp-2 leading-snug",children:H}),(F?.scope||z||J?.complexity&&J.complexity!=="routine")&&a.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[F?.scope&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${F.scope==="major"?"bg-purple-500/20 text-purple-400":F.scope==="feature"?"bg-blue-500/20 text-blue-400":"bg-muted/30 text-muted-foreground/70"}`,children:F.scope}),z&&a.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground/70 font-medium",children:z}),J?.complexity&&J.complexity!=="routine"&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${J.complexity==="gnarly"?"bg-red-500/20 text-red-400":"bg-amber-500/20 text-amber-400"}`,children:J.complexity})]})]})}),a.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground shrink-0",children:Q?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-green-500 font-medium",children:"Active"}),a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{variant:"ghost",size:"icon",className:"w-6 h-6 hover:bg-muted",onClick:oe=>{oe.preventDefault(),oe.stopPropagation(),k?.()},type:"button",children:a.jsx(FC,{size:14})})}),a.jsx(pn,{children:a.jsx("p",{children:"Stop (graceful)"})})]})}),a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{variant:"ghost",size:"icon",className:"w-6 h-6 hover:bg-red-500/20 text-red-500",onClick:oe=>{oe.preventDefault(),oe.stopPropagation(),w?.()},type:"button",children:a.jsx(va,{size:14})})}),a.jsx(pn,{children:a.jsx("p",{children:"Force Kill (immediate)"})})]})})]}):a.jsxs("div",{className:"flex items-center gap-2 h-6",children:[a.jsx("span",{className:"text-muted-foreground/50 tabular-nums",children:D(s)}),a.jsx("span",{className:"text-muted-foreground/30",children:"→"}),a.jsx("span",{className:"text-muted-foreground tabular-nums",children:D(n)})]})})]}),(se||le)&&a.jsx("div",{className:"mt-4",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-4 [&>*]:min-w-0",children:[Z?.content||K.length>0?a.jsxs("div",{className:"flex flex-col gap-3 h-full",children:[Z?.content&&a.jsxs("div",{className:`border ${hn(Z.color).border} rounded-lg p-3 ${hn(Z.color).bg} flex-shrink-0`,children:[a.jsxs("div",{className:`text-[10px] uppercase tracking-wider ${hn(Z.color).text} mb-2 flex items-center gap-1.5`,children:[Z.icon&&a.jsx("span",{className:"text-xs leading-none",children:Z.icon}),"Current State",G&&a.jsxs("span",{className:"text-muted-foreground/40 font-normal lowercase",children:["(",B(G),")"]})]}),a.jsx(B4,{content:Z.content,textSize:"text-xs",className:hn(Z.color).text})]}),K.length>0&&a.jsxs("div",{ref:R,className:"border border-border/30 rounded-lg p-3 bg-card/20 flex-1 min-h-0 overflow-y-auto scrollbar-thin scrollbar-thumb-border/50 scrollbar-track-transparent hover:scrollbar-thumb-border/70",children:[a.jsxs("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/50 mb-2",children:["Progress (",K.length,")"]}),a.jsx("div",{className:"space-y-0",children:K.map((oe,ce)=>{const re=oe.status.toLowerCase().replace(/[_-]/g,""),ge=["done","complete","completed"].some(be=>re.includes(be))?"done":["inprogress","current"].some(be=>re.includes(be))?"current":["onhold","hold","paused"].some(be=>re.includes(be))?"onhold":["superseded","abandoned","deprecated"].some(be=>re.includes(be))?"superseded":"pending";return a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[a.jsx("div",{className:`flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full text-[10px] ${ge==="done"?"bg-green-500/20 text-green-400":ge==="current"?"bg-accent/20 text-accent":ge==="onhold"?"bg-amber-500/20 text-amber-400":ge==="superseded"?"bg-muted-foreground/20 text-muted-foreground/40 line-through":"bg-muted/20 text-muted-foreground/40"}`,children:ge==="done"?"✓":ge==="current"?"→":ge==="onhold"?"⏸":ge==="superseded"?"×":"○"}),a.jsx("span",{className:`text-xs ${ge==="done"?"text-muted-foreground/50":ge==="current"?"text-foreground":ge==="onhold"?"text-amber-400/60":ge==="superseded"?"text-muted-foreground/30 line-through":"text-muted-foreground/40"}`,children:oe.label})]}),ce<K.length-1&&a.jsx("div",{className:"border-t border-border/20"})]},ce)})})]})]}):le?a.jsxs("div",{className:"flex flex-col gap-3 h-full",children:[a.jsxs("div",{className:"border border-border/20 rounded-lg p-3 bg-muted/5",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/20 mb-2",children:"Current State"}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"h-3 w-full bg-muted/15 rounded animate-pulse"}),a.jsx("div",{className:"h-3 w-3/4 bg-muted/10 rounded animate-pulse"})]})]}),a.jsxs("div",{className:"border border-border/20 rounded-lg p-3 bg-muted/5 flex-1",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/20 mb-2",children:"Progress"}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-4 h-4 rounded-full bg-muted/20 animate-pulse"}),a.jsx("div",{className:"h-3 flex-1 bg-muted/15 rounded animate-pulse"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-4 h-4 rounded-full bg-muted/15 animate-pulse"}),a.jsx("div",{className:"h-3 flex-1 bg-muted/10 rounded animate-pulse"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-4 h-4 rounded-full bg-muted/10 animate-pulse"}),a.jsx("div",{className:"h-3 w-2/3 bg-muted/10 rounded animate-pulse"})]})]})]})]}):null,O.length>0?a.jsxs("div",{ref:P,className:"border border-border/30 rounded-lg p-3 bg-card/20 h-full overflow-y-auto scrollbar-thin scrollbar-thumb-border/50 scrollbar-track-transparent hover:scrollbar-thumb-border/70",children:[a.jsxs("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/50 mb-2",children:["Notable (",O.length,")"]}),a.jsx("div",{className:"space-y-0",children:O.map((oe,ce)=>a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-start gap-2 text-xs text-foreground/60 py-1.5",children:[a.jsx("div",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:oe.icon&&new RegExp("^\\p{Emoji}$","u").test(oe.icon)?a.jsx("span",{className:"text-[12px] leading-none",children:oe.icon}):te(oe.type)}),a.jsx("span",{className:"flex-1",children:oe.description||oe.text})]}),ce<O.length-1&&a.jsx("div",{className:"border-t border-border/20"})]},ce))})]}):le?a.jsxs("div",{className:"border border-border/20 rounded-lg p-3 bg-muted/5",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/20 mb-2",children:"Notable"}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{className:"w-4 h-4 rounded bg-muted/15 animate-pulse flex-shrink-0"}),a.jsx("div",{className:"h-3 flex-1 bg-muted/15 rounded animate-pulse"})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{className:"w-4 h-4 rounded bg-muted/10 animate-pulse flex-shrink-0"}),a.jsx("div",{className:"h-3 flex-1 bg-muted/10 rounded animate-pulse"})]})]})]}):se?a.jsxs("div",{ref:P,className:"border border-border/20 rounded-lg p-3 bg-card/10 h-full flex flex-col",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/30 mb-2",children:"Notable"}),a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx("span",{className:"text-xs text-muted-foreground/30 italic",children:"No significant events yet"})})]}):null,T.length>0?a.jsx("div",{ref:L,className:"space-y-2",children:T.map((oe,ce)=>{const re=hn(oe.color),ge=oe.label||oe.title,be=oe.icon,Ze=oe.value&&typeof oe.value=="string"?[oe.value]:oe.items||[];return a.jsxs("div",{className:`border-2 ${re.border} rounded p-2.5 ${re.bg} flex-1`,children:[a.jsxs("div",{className:`text-[10px] uppercase tracking-wider ${re.text} mb-1.5 flex items-center gap-1.5`,children:[be&&new RegExp("^\\p{Emoji}$","u").test(be)?a.jsx("span",{className:"text-sm",children:be}):be?a.jsx(We,{name:be,size:14,className:re.icon}):null,ge]}),a.jsx("div",{className:"space-y-0.5",children:Ze.slice(0,5).map((ct,ft)=>{const jt=typeof ct=="object"&&ct!==null?ct.text:ct,et=Ze.length>1;return a.jsxs("div",{className:"text-xs text-foreground/70 flex items-start gap-1.5",children:[et&&a.jsx("span",{className:"text-muted-foreground/40 shrink-0 mt-0.5 text-[10px]",children:"•"}),a.jsx("span",{children:jt})]},ft)})})]},ce)})}):le?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"border border-border/20 rounded p-2.5 bg-muted/5",children:[a.jsx("div",{className:"h-3 w-16 bg-muted/20 rounded animate-pulse mb-1.5"}),a.jsx("div",{className:"h-3 w-full bg-muted/10 rounded animate-pulse"})]}),a.jsxs("div",{className:"border border-border/20 rounded p-2.5 bg-muted/5",children:[a.jsx("div",{className:"h-3 w-20 bg-muted/15 rounded animate-pulse mb-1.5"}),a.jsx("div",{className:"h-3 w-full bg-muted/10 rounded animate-pulse"})]})]}):null]})}),!se&&(I||ie.length>0)&&a.jsxs("div",{className:"space-y-1 text-xs",children:[I&&a.jsxs("div",{className:"text-accent",children:["→ ",I]}),ie.length>0&&a.jsxs("div",{className:"space-y-0.5",children:[ie.slice(0,2).map((oe,ce)=>a.jsxs("div",{className:"flex items-center gap-1.5 text-foreground/70",children:[a.jsx(As,{size:8,className:"text-amber-500/70"}),a.jsx("span",{className:"line-clamp-1",children:oe})]},ce)),ie.length>2&&a.jsxs("div",{className:"text-muted-foreground/50 pl-4",children:["+",ie.length-2," more"]})]})]})]})]})}),(j||E)&&!Q&&a.jsx("div",{className:"absolute bottom-5 right-4",children:a.jsx(mr,{children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{variant:"ghost",size:"icon",className:`w-6 h-6 ${g?"text-green-500/60 hover:text-green-500 hover:bg-green-500/10":"text-muted-foreground/40 hover:text-muted-foreground hover:bg-muted"}`,onClick:oe=>{oe.preventDefault(),oe.stopPropagation(),g?E?.():j?.()},type:"button",children:g?a.jsx(xC,{size:14}):a.jsx(v2,{size:14})})}),a.jsx(pn,{children:a.jsx("p",{children:g?"Unarchive":"Archive"})})]})})}),a.jsx("div",{className:"border-b border-border/20"})]})}function OF({conversations:e,loading:t,loadingMore:n,hasMore:s,error:o,activeTab:l,onLoadMore:c}){const f=_p(),p=d.useRef(null),m=d.useRef(null),{recentDirectories:h,invalidateConversations:g,recentActions:y}=cm(),b=R=>{f(`/c/${R}`)},k=async R=>{try{const P=await Ee.stopSession(R);P.success?g():console.error("Failed to stop session:",P.error)}catch(P){console.error("Failed to stop session:",P)}},w=async R=>{try{const P=await Ee.forceKillSession(R);P.success?g():console.error("Failed to force kill session:",P.error)}catch(P){console.error("Failed to force kill session:",P)}},S=async(R,P)=>{try{const L=await Ee.injectMessage(R,P);L.success||console.error("Failed to inject message:",L.error)}catch(L){console.error("Failed to inject message:",L)}},j=async R=>{const P=document.querySelector(`[data-session-id="${R}"]`);P&&(P.style.display="none");try{await Ee.updateSession(R,{archived:!0}),g()}catch(L){console.error("Failed to archive task:",L),P&&(P.style.display="")}},E=async R=>{const P=document.querySelector(`[data-session-id="${R}"]`);P&&(P.style.display="none");try{await Ee.updateSession(R,{archived:!1}),g()}catch(L){console.error("Failed to unarchive task:",L),P&&(P.style.display="")}},N=d.useMemo(()=>{const R=e.filter(L=>L.sessionInfo.pinned).map(L=>L.sessionId).sort().join(","),P=e.map(L=>L.sessionId).sort().join(",");return`${R}|${P}`},[e]),M=d.useMemo(()=>[...e].sort((R,P)=>R.sessionInfo.pinned&&!P.sessionInfo.pinned?-1:!R.sessionInfo.pinned&&P.sessionInfo.pinned?1:new Date(P.createdAt).getTime()-new Date(R.createdAt).getTime()),[e,N]),_=d.useCallback(R=>{const[P]=R;P.isIntersecting&&s&&!n&&!t&&c()},[s,n,t,c]);return d.useEffect(()=>{const R=new IntersectionObserver(_,{root:p.current,rootMargin:"100px",threshold:.1}),P=m.current;return P&&R.observe(P),()=>{P&&R.unobserve(P)}},[_]),t?a.jsx("div",{className:"flex flex-col w-full flex-1",children:a.jsx("div",{className:"flex items-center justify-center w-full py-12 px-4 text-muted-foreground text-sm text-center bg-background animate-pulse",children:"Loading..."})}):o?a.jsx("div",{className:"flex flex-col w-full flex-1 ",children:a.jsx("div",{className:"flex items-center justify-center w-full py-12 px-4 text-destructive text-sm text-center bg-background",children:o})}):e.length===0?a.jsx("div",{className:"flex flex-col w-full flex-1 ",children:a.jsx("div",{className:"flex items-center justify-center w-full py-12 px-4 text-muted-foreground text-sm text-center bg-background",children:l==="archive"?"No archived sessions":"No sessions yet"})}):a.jsxs("div",{ref:p,className:"flex flex-col w-full",children:[M.map(R=>a.jsx("div",{"data-session-id":R.sessionId,children:a.jsx(FF,{id:R.sessionId,title:R.sessionInfo.custom_name||R.summary,timestamp:R.updatedAt,createdAt:R.createdAt,projectPath:R.projectPath,recentDirectories:h,status:R.status,messageCount:R.messageCount,toolMetrics:R.toolMetrics,liveStatus:R.liveStatus,insights:R.insights,identityImage:R.sessionInfo.identity_image,recentActions:y[R.sessionId],isArchived:l==="archive",isPinned:R.sessionInfo.pinned,onClick:()=>b(R.sessionId),onCancel:R.status==="ongoing"?()=>k(R.sessionId):void 0,onForceKill:R.status==="ongoing"?()=>w(R.sessionId):void 0,onInjectMessage:R.status==="ongoing"?P=>S(R.sessionId,P):void 0,onArchive:R.status==="completed"&&l!=="archive"?()=>j(R.sessionId):void 0,onUnarchive:R.status==="completed"&&l==="archive"?()=>E(R.sessionId):void 0})},R.sessionId)),s&&a.jsx("div",{ref:m,className:"flex items-center justify-center w-full p-4 min-h-[60px]",children:n&&a.jsx("div",{className:"flex items-center justify-center text-muted-foreground text-sm animate-pulse",children:"Loading more tasks..."})}),!s&&e.length>0&&a.jsx("div",{className:"flex items-center justify-center w-full p-4 text-muted-foreground/70 text-xs text-center",children:"No more tasks to load"})]})}function V4({isOpen:e,onClose:t}){if(!e)return null;const n=()=>{window.open("https://claudia.dev/upgrade","_blank")},s=()=>{window.location.hash="/settings?tab=license",t()};return a.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[a.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),a.jsxs("div",{className:"relative z-10 w-full max-w-md p-6 mx-4 bg-card border border-border rounded-lg shadow-xl",children:[a.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[a.jsx("div",{className:"flex items-center justify-center w-12 h-12 rounded-full bg-primary/10",children:a.jsx(ya,{className:"w-6 h-6 text-primary"})}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h2",{className:"text-xl font-semibold text-foreground mb-1",children:"Upgrade to Pro"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"You've reached the free tier limit of 1 concurrent session"})]})]}),a.jsxs("div",{className:"mb-6 space-y-3",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-emerald-500/10 flex items-center justify-center mt-0.5",children:a.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:"Unlimited concurrent sessions"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Work on multiple projects simultaneously"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-emerald-500/10 flex items-center justify-center mt-0.5",children:a.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:"AI-powered insights"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Understand session progress and context at a glance"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-emerald-500/10 flex items-center justify-center mt-0.5",children:a.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:"Support development"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Help fund ongoing improvements and features"})]})]})]}),a.jsxs("div",{className:"mb-6 p-4 bg-muted/50 rounded-lg border border-border/50",children:[a.jsxs("div",{className:"flex items-baseline justify-between mb-1",children:[a.jsx("span",{className:"text-2xl font-bold text-foreground",children:"$25"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"/month"})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Cancel anytime, no commitments"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors font-medium",children:[a.jsx("span",{children:"Upgrade to Pro"}),a.jsx(ga,{className:"w-4 h-4"})]}),a.jsx("button",{onClick:s,className:"w-full px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Already have a license key?"}),a.jsx("button",{onClick:t,className:"w-full px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Maybe later"})]})]})]})}function DF(){const{conversations:e,loading:t,loadingMore:n,hasMore:s,error:o,activeFilters:l,setActiveFilters:c,loadMoreConversations:f,recentDirectories:p,getMostRecentWorkingDirectory:m,invalidateConversations:h}=cm(),[g,y]=d.useState("sessions"),[b,k]=d.useState(!1),[w,S]=d.useState("~"),[j,E]=d.useState(!1),N=d.useRef(null);d.useEffect(()=>{Ee.getConfig().then(B=>{B.server?.defaultWorkingDirectory&&S(B.server.defaultWorkingDirectory)}).catch(()=>{})},[]);const M=B=>B?.toLowerCase().includes("/claudia")||!1,_=e.filter(B=>M(B.projectPath)),R=e.filter(B=>!M(B.projectPath)),P=g==="automated"?_:R;d.useEffect(()=>{const B=g==="archive";B!==l.archived&&c({archived:B})},[g,l.archived,c]),d.useEffect(()=>{const B=setTimeout(()=>{N.current?.focusInput()},100);return()=>clearTimeout(B)},[]);const L=R.length>0?R[0].projectPath:w,G=async(B,W,Y,Q)=>{k(!0);try{const F=!Y||Y==="default"?"claude-opus-4-5-20251101":Y,Z=await Ee.startConversation({workingDirectory:W,initialPrompt:B,model:F,permissionMode:Q==="default"?void 0:Q});await h()}catch(F){console.error("Failed to start conversation:",F),F instanceof Error&&F.message.includes("Session limit reached")?E(!0):alert(`Failed to start conversation: ${F instanceof Error?F.message:"Unknown error"}`)}finally{k(!1)}},D=B=>{y(B)};return a.jsxs("div",{className:"flex h-screen w-full bg-background",children:[a.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[a.jsx(hN,{}),a.jsx("main",{className:"flex-1 overflow-y-auto overflow-x-hidden scrollbar-auto-hide",children:a.jsxs("div",{className:"mx-auto w-full max-w-5xl px-4 py-6",children:[a.jsx("div",{className:"mb-6",children:a.jsx(r4,{ref:N,workingDirectory:L,onSubmit:G,isLoading:b,placeholder:"New task...",showDirectorySelector:!1,showModelSelector:!1,showStatusBar:!1,showDictation:!1,compact:!0,enableFileAutocomplete:!1,recentDirectories:p,getMostRecentWorkingDirectory:m,onFetchCommands:async B=>(await Ee.getCommands(B)).commands})}),a.jsx(FL,{activeTab:g,onTabChange:D,onRefreshInsights:async()=>{await Ee.refreshInsights(!0),h()},automatedCount:_.length}),a.jsx(OF,{conversations:P,loading:t,loadingMore:n,hasMore:s,error:o,activeTab:g,onLoadMore:()=>f()})]})})]}),a.jsx(V4,{isOpen:j,onClose:()=>E(!1)})]})}const zF=({messages:e,toolResults:t={},childrenMessages:n={},expandedTasks:s=new Set,onToggleTaskExpanded:o,isLoading:l,isStreaming:c,currentQuestionRequest:f,onAnswerQuestion:p,hasMore:m=!1,isLoadingMore:h=!1,onLoadMore:g})=>{const y=d.useRef(null),b=d.useRef(null),k=d.useRef(e.length),w=d.useRef(!1),S=d.useRef(null),j=d.useMemo(()=>e.filter(P=>!(P.type==="user"&&Array.isArray(P.content)&&P.content.every(G=>G.type==="tool_result"))),[e]),E=d.useMemo(()=>{const P=[];return j.forEach(L=>{const G=P[P.length-1];G&&G.type===L.type?G.messages.push(L):P.push({type:L.type,messages:[L],groupIndex:P.length})}),P},[j]),N=d.useMemo(()=>{const P=[];return E.forEach((L,G)=>{L.messages.forEach((D,B)=>{const W=B===L.messages.length-1,Y=E[G+1],Q=W&&(G<E.length-1&&L.type==="user"&&Y?.type==="assistant"||L.type==="user"&&G===E.length-1&&c);P.push({message:D,groupIndex:G,groupType:L.type,isFirstInGroup:B===0,isLastInGroup:W,showDivider:Q})})}),P},[E,c]);d.useEffect(()=>{const P=y.current;if(!P)return;const L=()=>{w.current=!0,S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{w.current=!1},150)};return P.addEventListener("scroll",L,{passive:!0}),()=>{P.removeEventListener("scroll",L),S.current&&clearTimeout(S.current)}},[]),d.useEffect(()=>{if(!m||h||!g||!b.current)return;const P=new IntersectionObserver(L=>{L[0].isIntersecting&&g()},{root:y.current,rootMargin:"200px 0px 0px 0px",threshold:0});return P.observe(b.current),()=>P.disconnect()},[m,h,g]),d.useEffect(()=>{const P=e.length>k.current;k.current=e.length,P&&!w.current&&y.current?.scrollTo({top:0,behavior:"smooth"})},[e.length]);const M=d.useMemo(()=>j.some(P=>P.type==="assistant"&&Array.isArray(P.content)?P.content.some(L=>{if(L.type==="tool_use"){const G=t[L.id];return!G||G.status==="pending"}return!1}):!1),[j,t]),_=d.useCallback(P=>a.jsx("div",{className:"w-full flex justify-center",children:a.jsxs("div",{className:"w-full max-w-5xl px-4 py-1",children:[a.jsx(t4,{message:P.message,toolResults:t,childrenMessages:n,expandedTasks:s,onToggleTaskExpanded:o,isFirstInGroup:P.isFirstInGroup,isLastInGroup:P.isLastInGroup,isStreaming:c,currentQuestionRequest:f,onAnswerQuestion:p}),P.showDivider&&a.jsx("div",{className:"h-px bg-border/20 my-3 w-full"})]})},P.message.messageId),[t,n,s,o,c,f,p]);if(j.length===0&&!l)return a.jsx("div",{className:"flex-1 bg-background scrollbar-auto-hide",children:a.jsx("div",{className:"text-center p-8 text-muted-foreground",children:a.jsx("p",{children:"No messages yet. Start by typing a message below."})})});const R=[...N].reverse();return a.jsxs("div",{ref:y,className:"flex-1 min-h-0 overflow-y-auto overflow-x-hidden bg-background flex flex-col-reverse scrollbar-auto-hide",children:[!l&&c&&E.length>0&&!M&&a.jsx("div",{className:"flex items-start px-4 mt-2 pb-4 w-full justify-center",children:a.jsx("div",{className:"w-full max-w-5xl",children:a.jsx("div",{className:"w-4 h-5 flex-shrink-0 flex items-center justify-center text-foreground relative",children:a.jsx("div",{className:"w-2.5 h-2.5 bg-foreground rounded-full mt-3.5 animate-pulse"})})})}),R.map(P=>_(P)),l&&j.length===0&&a.jsx("div",{className:"flex items-center justify-center p-8",children:a.jsxs("div",{className:"flex gap-1",children:[a.jsx("span",{className:"w-1 h-1 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.32s]"}),a.jsx("span",{className:"w-1 h-1 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.16s]"}),a.jsx("span",{className:"w-1 h-1 bg-blue-500 rounded-full animate-bounce"})]})}),h&&a.jsx("div",{className:"flex items-center justify-center p-4",children:a.jsxs("div",{className:"flex gap-1",children:[a.jsx("span",{className:"w-1 h-1 bg-muted-foreground rounded-full animate-bounce [animation-delay:-0.32s]"}),a.jsx("span",{className:"w-1 h-1 bg-muted-foreground rounded-full animate-bounce [animation-delay:-0.16s]"}),a.jsx("span",{className:"w-1 h-1 bg-muted-foreground rounded-full animate-bounce"})]})}),m&&!h&&a.jsx("div",{ref:b,className:"h-1 w-full"})]})};function $F({sessionId:e,isArchived:t=!1,insightsPanelOpen:n,onToggleInsightsPanel:s}){const o=_p(),{invalidateConversations:l}=cm(),c=()=>{o("/")},f=async()=>{if(e)try{await Ee.updateSession(e,{archived:!t}),l(),o("/")}catch(m){console.error(`Failed to ${t?"unarchive":"archive"} session:`,m)}},p=async()=>{if(e)try{await navigator.clipboard.writeText(e)}catch(m){console.error("Failed to copy session ID:",m)}};return a.jsx(mr,{children:a.jsxs("div",{className:"flex justify-between items-center gap-3 p-3 border-b border-border/50 bg-background transition-colors",children:[a.jsx("div",{className:"flex items-center",children:a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsx(Oe,{variant:"ghost",size:"icon",onClick:c,"aria-label":"Go back to tasks",className:"text-muted-foreground hover:text-foreground hover:bg-muted",children:a.jsx(bC,{size:20})})}),a.jsx(pn,{children:a.jsx("p",{children:"Go back to tasks"})})]})}),a.jsxs("div",{className:"flex items-center gap-2",children:[s&&a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsxs(Oe,{variant:"ghost",size:"sm",onClick:s,"aria-label":n?"Hide insights panel":"Show insights panel",className:"hidden md:flex items-center gap-2 h-9 px-3 text-muted-foreground hover:text-foreground hover:bg-muted",children:[n?a.jsx(Rj,{size:16}):a.jsx(Ij,{size:16}),a.jsx("span",{className:"text-xs font-medium",children:n?"Hide Insights":"Show Insights"})]})}),a.jsx(pn,{children:a.jsx("p",{children:n?"Hide insights":"Show insights"})})]}),e&&a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsxs(Oe,{variant:"ghost",size:"sm",onClick:p,"aria-label":"Copy session ID",className:"flex items-center gap-2 h-9 px-3 text-muted-foreground hover:text-foreground hover:bg-muted",children:[a.jsx(w2,{size:16}),a.jsx("span",{className:"text-xs font-medium",children:"Copy ID"})]})}),a.jsx(pn,{children:a.jsx("p",{children:"Copy session ID"})})]}),a.jsxs(En,{children:[a.jsx(Nn,{asChild:!0,children:a.jsxs(Oe,{variant:"ghost",size:"sm",onClick:f,disabled:!e,"aria-label":t?"Unarchive Task":"Archive Task",className:"flex items-center gap-2 h-9 px-3 text-muted-foreground hover:text-foreground hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",children:[a.jsx(v2,{size:16}),a.jsx("span",{className:"text-xs font-medium",children:t?"Unarchive":"Archive"})]})}),a.jsx(pn,{children:a.jsx("p",{children:t?"Unarchive Task":"Archive Task"})})]})]})]})})}function U4(e){return e?Math.floor((Date.now()-new Date(e).getTime())/1e3):0}function HF(e){if(!e)return null;const t=U4(e);if(t<5)return"just now";if(t<60)return`${t}s ago`;const n=Math.floor(t/60);if(n<60)return`${n}m ago`;const s=Math.floor(n/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`}function BF({insights:e,isLoading:t,isOpen:n,onClose:s,syncState:o}){const[l,c]=d.useState(!1),[,f]=d.useState(0);d.useEffect(()=>{if(!o?.lastUpdateTime)return;let B;const W=()=>{const Q=U4(o.lastUpdateTime)<60?1e3:1e4;B=setTimeout(()=>{f(F=>F+1),W()},Q)};return W(),()=>clearTimeout(B)},[o?.lastUpdateTime]);const p=e?.context,m=e?.currentState,h=e?.milestones||[],g=e?.recentActions||[],y=e?.notable||[],b=e?.tags,k=e?.panels||[],w=e?.theme,S=e?.currentTask,j=e?.outstanding||[],E=async()=>{if(!e?.sessionId)return;const B=e.lastPatchTraceId?`${e.sessionId}:${e.lastPatchTraceId}`:e.sessionId;try{await navigator.clipboard.writeText(B),c(!0),setTimeout(()=>c(!1),2e3)}catch(W){console.error("Failed to copy reference:",W)}},N=B=>{switch(B){case"error":return a.jsx(Yp,{size:12,className:"text-red-400"});case"fix":return a.jsx($n,{size:12,className:"text-green-400"});case"blocker":return a.jsx(xc,{size:12,className:"text-amber-400"});case"correction":return a.jsx(yc,{size:12,className:"text-blue-400"});case"decision":return a.jsx(C2,{size:12,className:"text-purple-400"});case"breakthrough":return a.jsx(va,{size:12,className:"text-yellow-400"});case"iteration":return a.jsx(As,{size:12,className:"text-muted-foreground"});case"insight":return a.jsx(xa,{size:12,className:"text-yellow-300"});case"pivot":return a.jsx(yc,{size:12,className:"text-purple-400"});case"infrastructure":return a.jsx(xc,{size:12,className:"text-slate-400"});case"refinement":return a.jsx(As,{size:12,className:"text-blue-400"});case"validation":return a.jsx($n,{size:12,className:"text-emerald-400"});default:return a.jsx(xa,{size:12,className:"text-muted-foreground"})}},M=B=>{const W=B.toLowerCase();return W.includes("add")||W.includes("creat")||W.includes("implement")?a.jsx(Lj,{size:12,className:"text-green-400"}):W.includes("fix")||W.includes("resolv")||W.includes("repair")?a.jsx($n,{size:12,className:"text-green-400"}):W.includes("updat")||W.includes("modif")||W.includes("chang")||W.includes("refactor")?a.jsx(S2,{size:12,className:"text-blue-400"}):W.includes("debug")||W.includes("investigat")||W.includes("analyz")?a.jsx(op,{size:12,className:"text-amber-400"}):W.includes("search")||W.includes("find")||W.includes("look")||W.includes("explor")?a.jsx(ii,{size:12,className:"text-purple-400"}):W.includes("review")||W.includes("read")||W.includes("document")?a.jsx(eo,{size:12,className:"text-muted-foreground"}):W.includes("config")||W.includes("set up")||W.includes("setup")?a.jsx(tm,{size:12,className:"text-muted-foreground"}):W.includes("run")||W.includes("test")||W.includes("execut")?a.jsx(em,{size:12,className:"text-green-400"}):W.includes("remov")||W.includes("delet")?a.jsx(Xj,{size:12,className:"text-red-400"}):a.jsx(gc,{size:12,className:"text-muted-foreground/50"})};if(n===!1)return null;if(t&&!e)return a.jsx("aside",{className:"hidden md:block w-[480px] border-l border-border/50 bg-card/30 flex-shrink-0 overflow-y-auto",children:a.jsx("div",{className:"p-5",children:a.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground/50",children:[a.jsx(aa,{size:14,className:"animate-spin"}),a.jsx("span",{children:"Loading insights..."})]})})});if(!e)return null;const _=p?.mission,R=m?.content,P=h.length>0,L=g.length>0||y.length>0,G=k.length>0,D=S||j.length>0;return!_&&!R&&!P&&!L&&!G&&!D?null:a.jsx("aside",{className:"hidden md:block w-[480px] border-l border-border/50 bg-card/30 flex-shrink-0 overflow-y-auto scrollbar-auto-hide",children:a.jsxs("div",{className:"p-5 space-y-6",children:[_&&a.jsxs("div",{children:[(p?.project||p?.area)&&a.jsxs("div",{className:"text-xs text-muted-foreground/50 uppercase tracking-wider flex items-center gap-1.5 mb-2",children:[a.jsx("span",{children:p?.project}),p?.area&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-muted-foreground/30",children:"›"}),a.jsx("span",{children:p.area})]})]}),a.jsx("div",{className:"text-base font-medium text-foreground leading-snug",children:p?.mission}),(p?.scope||w||b?.complexity&&b.complexity!=="routine")&&a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-2.5",children:[p?.scope&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${p.scope==="major"?"bg-purple-500/20 text-purple-400":p.scope==="feature"?"bg-blue-500/20 text-blue-400":"bg-muted/30 text-muted-foreground/70"}`,children:p.scope}),w&&a.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground/70 font-medium",children:w}),b?.complexity&&b.complexity!=="routine"&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${b.complexity==="gnarly"?"bg-red-500/20 text-red-400":"bg-amber-500/20 text-amber-400"}`,children:b.complexity})]})]}),R&&m&&a.jsxs("div",{className:`border ${hn(m.color).border} rounded-lg p-4 ${hn(m.color).bg} relative group`,children:[a.jsxs("div",{className:`text-xs uppercase tracking-wider ${hn(m.color).text} mb-2.5 flex items-center gap-2`,children:[m.icon&&a.jsx("span",{className:"text-base leading-none",children:m.icon}),"Current State",o?.lastUpdateTime&&a.jsxs("span",{className:"text-[10px] text-muted-foreground/50 font-normal lowercase",children:["(",HF(o.lastUpdateTime),o.actionsSince>0?`, ${o.actionsSince} action${o.actionsSince!==1?"s":""} since`:", no actions since",")"]}),a.jsx("button",{onClick:E,className:"ml-auto opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-white/10 rounded",title:e?.lastPatchTraceId?"Copy debug reference (session:trace)":"Copy session ID",children:l?a.jsx(ha,{size:12,className:"text-green-400"}):a.jsx(HC,{size:12,className:hn(m.color).text})})]}),a.jsx(B4,{content:m.content})]}),P&&a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-3",children:"Progress"}),a.jsx("div",{className:"space-y-0",children:h.map((B,W)=>{let Y=1;return h.length>5&&(W===0?Y=.3:W===1?Y=.5:W===2&&(Y=.7)),a.jsxs("div",{style:{opacity:Y},className:"transition-opacity duration-300",children:[a.jsxs("div",{className:"flex items-start gap-2.5 py-2",children:[a.jsx("div",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full text-xs mt-0.5 ${B.status==="done"?"bg-green-500/20 text-green-400":B.status==="current"?"bg-accent/30 text-accent ring-1 ring-accent/50":"bg-muted/20 text-muted-foreground/40"}`,children:B.status==="done"?"✓":B.status==="current"?"→":"○"}),a.jsx("span",{className:`text-sm leading-snug ${B.status==="done"?"text-muted-foreground/50":B.status==="current"?"text-foreground":"text-muted-foreground/40"}`,children:B.label})]}),W<h.length-1&&a.jsx("div",{className:"border-t border-border/20"})]},W)})})]}),g.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-accent/60 mb-3",children:"Recent"}),a.jsx("div",{className:"space-y-0",children:g.map((B,W)=>a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-start gap-2.5 text-sm text-foreground/60 py-2",children:[a.jsx("span",{className:"flex-shrink-0 mt-0.5",children:M(B)}),a.jsx("span",{className:"leading-snug",children:B})]}),W<g.length-1&&a.jsx("div",{className:"border-t border-border/20"})]},W))})]}),y.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-3",children:"Notable"}),a.jsx("div",{className:"space-y-0",children:y.map((B,W)=>{const Y=B.text||B.description,Q=B.icon&&new RegExp("^\\p{Emoji}$","u").test(B.icon);let F=1;return y.length>5&&(W===0?F=.3:W===1?F=.5:W===2&&(F=.7)),a.jsxs("div",{style:{opacity:F},className:"transition-opacity duration-300",children:[a.jsxs("div",{className:"flex items-start gap-2.5 text-sm text-foreground/60 py-2",children:[a.jsx("div",{className:"w-3 h-3 flex items-center justify-center flex-shrink-0 mt-0.5",children:Q?a.jsx("span",{className:"text-[12px] leading-none",children:B.icon}):N(B.type)}),a.jsx("span",{className:"leading-snug",children:Y})]}),W<y.length-1&&a.jsx("div",{className:"border-t border-border/20"})]},W)})})]}),G&&a.jsx("div",{className:"space-y-3",children:k.map((B,W)=>{const Y=hn(B.color),Q=B.label||B.title,F=B.icon&&new RegExp("^\\p{Emoji}$","u").test(B.icon);return a.jsxs("div",{className:`border ${Y.border} rounded-lg p-4 ${Y.bg}`,children:[a.jsxs("div",{className:`text-xs uppercase tracking-wider ${Y.text} mb-2.5 flex items-center gap-2`,children:[B.icon&&(F?a.jsx("span",{className:"text-base leading-none",children:B.icon}):a.jsx(We,{name:B.icon,size:14,className:Y.icon})),Q]}),B.value?a.jsx("div",{className:"text-sm text-foreground/70 leading-snug",children:B.value}):B.items&&B.items.length>0?a.jsx("div",{className:"space-y-1.5",children:B.items.map((Z,K)=>{const O=typeof Z=="object"&&Z!==null,J=O?Z.text:Z,T=O?Z.icon:void 0;return a.jsxs("div",{className:"text-sm text-foreground/70 flex items-start gap-2",children:[T?a.jsx(We,{name:T,size:12,className:"text-muted-foreground/60 shrink-0 mt-0.5"}):a.jsx("span",{className:"text-muted-foreground/40 shrink-0",children:"•"}),a.jsx("span",{className:"leading-snug",children:J})]},K)})}):B.content?a.jsx("div",{className:"text-sm text-foreground/70 leading-snug",children:B.content}):null]},W)})}),!_&&!P&&!L&&!G&&D&&a.jsxs("div",{children:[S&&a.jsxs("div",{className:"text-sm text-accent mb-2",children:["→ ",S]}),j.length>0&&a.jsx("div",{className:"space-y-2",children:j.map((B,W)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground/70",children:[a.jsx(As,{size:6,className:"text-amber-500/70 flex-shrink-0"}),a.jsx("span",{children:B})]},W))})]})]})})}const VF=3e4,UF=1e3,ZF=1e4;function Z4(e,t){const[n,s]=d.useState(!1),[o,l]=d.useState(!0),c=d.useRef(null),f=d.useRef(null),p=d.useRef(),m=d.useRef(0),h=d.useRef(t);d.useEffect(()=>{h.current=t},[t]);const g=d.useCallback(()=>{l(!1),m.current=0,clearTimeout(p.current),c.current&&(c.current.cancel().catch(()=>{}),c.current=null),f.current&&(f.current.abort(),f.current=null),s(b=>(b&&h.current.onDisconnect?.(),!1))},[]),y=d.useCallback(async()=>{if(!(!e||c.current||f.current)){l(!0);try{f.current=new AbortController;const b=setTimeout(()=>{console.log(`[Stream] Connection timeout for ${e}, aborting...`),f.current?.abort()},ZF),k=Xi(),w={};k&&(w.Authorization=`Bearer ${k}`);const S=await fetch(`/api/stream/${e}`,{signal:f.current.signal,headers:w});if(clearTimeout(b),!S.ok)throw new Error(`Stream connection failed: ${S.status}`);if(!S.body)throw new Error("No response body");const j=S.body.getReader();c.current=j,s(!0),m.current=0,h.current.onConnect?.();const E=new TextDecoder;let N="";for(;;){const{done:M,value:_}=await j.read();if(M)break;const R=E.decode(_,{stream:!0});N+=R;const P=N.split(`
|
|
136
|
+
`);N=P.pop()||"";for(const L of P)if(L.trim())try{let G=L;if(L.startsWith("data: ")&&(G=L.substring(6)),L.startsWith(":"))continue;const D=JSON.parse(G);h.current.onMessage(D)}catch(G){console.error("Failed to parse stream message:",L,G)}}}catch(b){b.name!=="AbortError"&&(console.error("Stream error:",b),h.current.onError?.(b))}finally{const b=!o;if(c.current&&(c.current.cancel().catch(()=>{}),c.current=null),f.current=null,s(!1),h.current.onDisconnect?.(),!b&&document.visibilityState==="visible"&&e){const k=Math.min(UF*Math.pow(2,m.current),VF);m.current++,console.log(`[Stream] Connection lost, reconnecting in ${k}ms (attempt ${m.current})`),p.current=setTimeout(()=>{l(!0),y()},k)}}}},[e,g]);return d.useEffect(()=>(e?y():g(),()=>{g()}),[e]),d.useEffect(()=>{const b=()=>{document.visibilityState==="visible"&&!n&&o&&e&&(clearTimeout(p.current),y())};return document.addEventListener("visibilitychange",b),()=>{document.removeEventListener("visibilitychange",b),clearTimeout(p.current)}},[n,o,e,y]),{isConnected:n,connect:y,disconnect:g}}function WF(e={}){const[t,n]=d.useState([]),[s,o]=d.useState([]),[l,c]=d.useState({}),[f,p]=d.useState(),[m,h]=d.useState(null),[g,y]=d.useState(null),[b,k]=d.useState({}),[w,S]=d.useState(new Set),j=d.useCallback(()=>{n([]),o([]),c({}),p(void 0),h(null),y(null),k({}),S(new Set)},[]),E=d.useCallback(Y=>{if(Y.id.startsWith("optimistic-")?o(F=>[...F,Y]):(n(F=>[...F,Y]),Y.type==="user"&&o(F=>F.filter(Z=>{if(Z.type!=="user")return!0;const K=typeof Z.content=="string"?Z.content:JSON.stringify(Z.content),O=typeof Y.content=="string"?Y.content:JSON.stringify(Y.content);return K!==O}))),Y.type==="assistant"&&Array.isArray(Y.content)){const F=[];Y.content.forEach(Z=>{Z.type==="tool_use"&&Z.id&&F.push(Z.id)}),F.length>0&&c(Z=>{const K={};return F.forEach(O=>{Z[O]||(K[O]={status:"pending"})}),{...Z,...K}})}},[]),N=d.useCallback(Y=>{switch(Y.type){case"connected":break;case"system_init":p(Y.cwd);break;case"user":if(Y.message&&Array.isArray(Y.message.content)){const J={};let T=!1;if(Y.message.content.forEach(z=>{if(z.type==="tool_result"&&"tool_use_id"in z){T=!0;const H=z.tool_use_id;let I="";(typeof z.content=="string"||Array.isArray(z.content))&&(I=z.content),J[H]={status:"completed",result:I,is_error:z.is_error}}}),T){c(z=>({...z,...J}));break}}const Q=Y.parent_tool_use_id;if(Q){const J={id:"",messageId:`user-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,type:"user",content:Y.message.content,timestamp:new Date().toISOString(),workingDirectory:f,parentToolUseId:Q};k(T=>{const z={...T};return z[Q]||(z[Q]=[]),z[Q]=[...z[Q],J],z})}break;case"assistant":const F=Y.parent_tool_use_id,Z={id:Y.message.id,messageId:`assistant-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,type:"assistant",content:Array.isArray(Y.message.content)?Y.message.content:[Y.message.content],timestamp:new Date().toISOString(),workingDirectory:f,parentToolUseId:F};F?k(J=>{const T={...J};return T[F]||(T[F]=[]),T[F]=[...T[F],Z],T}):(E(Z),e.onAssistantMessage?.(Z));break;case"result":Y.session_id&&e.onResult?.(Y.session_id);break;case"error":const K=`error-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,O={id:K,messageId:K,type:"error",content:Y.error,timestamp:new Date().toISOString()};E(O),e.onError?.(Y.error);break;case"closed":e.onClosed?.(),h(null),y(null);break;case"permission_request":h(Y.data),e.onPermissionRequest?.(Y.data);break;case"question_request":y(Y.data),e.onQuestionRequest?.(Y.data);break}},[E,e,f]),M=d.useCallback(Y=>{const Q=[],F={};Y.forEach(J=>{J.parentToolUseId?(F[J.parentToolUseId]||(F[J.parentToolUseId]=[]),F[J.parentToolUseId].push(J)):Q.push(J)}),n(Q),k(F);const Z=new Set(Y.filter(J=>J.type==="user").map(J=>typeof J.content=="string"?J.content:JSON.stringify(J.content)));o(J=>J.filter(T=>{if(T.type!=="user")return!0;const z=typeof T.content=="string"?T.content:JSON.stringify(T.content);return!Z.has(z)}));const K=Y.slice().reverse().find(J=>J.workingDirectory)?.workingDirectory;K&&p(K);const O={};Y.forEach(J=>{J.type==="assistant"&&Array.isArray(J.content)?J.content.forEach(T=>{T.type==="tool_use"&&T.id&&(O[T.id]={status:"pending"})}):J.type==="user"&&Array.isArray(J.content)&&J.content.forEach(T=>{if(T.type==="tool_result"&&"tool_use_id"in T){const z=T.tool_use_id;if(O[z]){let H="";(typeof T.content=="string"||Array.isArray(T.content))&&(H=T.content),O[z]={status:"completed",result:H,is_error:T.is_error}}}})}),c(O)},[]),_=d.useCallback(Y=>{S(Q=>{const F=new Set(Q);return F.has(Y)?F.delete(Y):F.add(Y),F})},[]),R=d.useCallback(()=>{h(null)},[]),P=d.useCallback(Y=>{h(Y)},[]),L=d.useCallback(()=>{y(null)},[]),G=d.useCallback(Y=>{y(Y)},[]),D=d.useCallback(()=>{o([])},[]),B=d.useCallback(Y=>{const Q=[],F={};Y.forEach(K=>{K.parentToolUseId?(F[K.parentToolUseId]||(F[K.parentToolUseId]=[]),F[K.parentToolUseId].push(K)):Q.push(K)}),n(K=>[...Q,...K]),k(K=>{const O={...K};for(const[J,T]of Object.entries(F))O[J]?O[J]=[...T,...O[J]]:O[J]=T;return O});const Z={};Y.forEach(K=>{K.type==="assistant"&&Array.isArray(K.content)?K.content.forEach(O=>{O.type==="tool_use"&&O.id&&(Z[O.id]={status:"pending"})}):K.type==="user"&&Array.isArray(K.content)&&K.content.forEach(O=>{if(O.type==="tool_result"&&"tool_use_id"in O){const J=O.tool_use_id;if(Z[J]){let T="";(typeof O.content=="string"||Array.isArray(O.content))&&(T=O.content),Z[J]={status:"completed",result:T,is_error:O.is_error}}}})}),c(K=>({...Z,...K}))},[]);return{messages:d.useMemo(()=>{if(s.length===0)return t;const Y=[...t,...s];return Y.sort((Q,F)=>new Date(Q.timestamp).getTime()-new Date(F.timestamp).getTime()),Y},[t,s]),toolResults:l,currentPermissionRequest:m,currentQuestionRequest:g,childrenMessages:b,expandedTasks:w,addMessage:E,clearMessages:j,clearOptimisticMessages:D,handleStreamMessage:N,setAllMessages:M,prependMessages:B,toggleTaskExpanded:_,clearPermissionRequest:R,setPermissionRequest:P,clearQuestionRequest:L,setQuestionRequest:G}}function qF(){const{sessionId:e}=p6(),t=Mp(),n=_p();lm();const[s,o]=d.useState(null),[l,c]=d.useState(!1),[f,p]=d.useState(null),[m,h]=d.useState(null),[g,y]=d.useState("Conversation"),[b,k]=d.useState(!1),[w,S]=d.useState(!1),[j,E]=d.useState(null),[N,M]=d.useState(""),[_,R]=d.useState(()=>{const fe=localStorage.getItem("insightsPanelOpen");return fe!==null?fe==="true":typeof window<"u"&&window.innerWidth>=768}),P=d.useCallback(()=>{R(fe=>{const ke=!fe;return localStorage.setItem("insightsPanelOpen",String(ke)),ke})},[]),L=d.useRef(null),G=d.useRef(0),D=d.useRef(!0);d.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const[B,W]=d.useState(!1),[Y,Q]=d.useState(),[F,Z]=d.useState(!1),{messages:K,toolResults:O,currentPermissionRequest:J,currentQuestionRequest:T,childrenMessages:z,expandedTasks:H,clearOptimisticMessages:I,addMessage:ie,setAllMessages:se,prependMessages:le,handleStreamMessage:te,toggleTaskExpanded:oe,clearPermissionRequest:ce,setPermissionRequest:re,clearQuestionRequest:ge}=WF({onResult:fe=>{fe&&fe!==e&&D.current&&n(`/c/${fe}`)},onError:fe=>{console.warn("[ConversationView] Stream error event:",fe)},onClosed:()=>{o(null),c(!1)}});d.useEffect(()=>{t.state&&window.history.replaceState({},document.title)},[t]),d.useEffect(()=>(o(null),c(!1),p(null),()=>{o(null),c(!1),p(null)}),[e]);const be=50,{data:Pe,isLoading:Ze,error:ct}=bc({queryKey:Jn.details(e||""),queryFn:()=>Ee.getConversationDetails(e,{limit:be}),enabled:!!e,staleTime:3e4}),{data:ft,isLoading:Ye}=bc({queryKey:["insights",e],queryFn:()=>Ee.getSessionInsights(e),enabled:!!e,staleTime:3e4,refetchOnMount:"always"}),jt=d.useMemo(()=>{if(!ft)return;const fe=ft.patchedAt||ft.computedAt||null;let ke=0;if(fe){const Be=new Date(fe);for(const Ke of K)new Date(Ke.timestamp)>Be&&ke++}return{lastUpdateTime:fe,actionsSince:ke}},[ft,K]);d.useEffect(()=>{if(!Pe)return;const fe=Uf(Pe);se(fe),G.current=Pe.messages.length,W(Pe.hasMore??!1),Q(Pe.oldestMessageId);const ke=fe.filter(Be=>Be.workingDirectory);if(ke.length>0){const Be=ke[ke.length-1].workingDirectory;Be&&M(Be)}setTimeout(()=>{L.current?.focusInput()},100)},[Pe,se]),d.useEffect(()=>{if(!e)return;const fe=async()=>{try{const Ke=(await Ee.getConversations({limit:100})).conversations.find(it=>it.sessionId===e);if(Ke){E(Ke);const it=Ke.sessionInfo.custom_name||Ke.summary||"Untitled";if(y(it),Ke.status==="ongoing"&&Ke.streamingId){if(o(Ke.streamingId),!f){const ot=Ke.updatedAt?new Date(Ke.updatedAt).getTime():Date.now();p(ot)}try{const{permissions:ot}=await Ee.getPermissions({streamingId:Ke.streamingId,status:"pending"});if(ot.length>0){const bt=ot.reduce((ht,Lt)=>new Date(Lt.timestamp)>new Date(ht.timestamp)?Lt:ht);re(bt)}}catch(ot){console.warn("[ConversationView] Failed to fetch existing permissions:",ot)}}}}catch(Be){console.warn("[ConversationView] Failed to check stream status:",Be)}};fe();const ke=()=>{document.hidden||fe()};return document.addEventListener("visibilitychange",ke),()=>{document.removeEventListener("visibilitychange",ke)}},[e,re]);const et=Ze,Kt=ct?ct.message:null,{isConnected:Qt,disconnect:nn}=Z4(s,{onMessage:te,onError:fe=>{h(`Connection error: ${fe.message}. Reconnecting...`)},onConnect:()=>{h(null)}});d.useEffect(()=>{if(!e||Qt)return;let fe=null;const ke=async()=>{if(!document.hidden)try{const ot=await Ee.getConversationDetails(e),bt=ot.messages.length;if(bt!==G.current&&G.current>0){const ht=Uf(ot);se(ht)}G.current=bt}catch{}},Be=()=>{fe||(fe=setInterval(ke,2e3))},Ke=()=>{fe&&(clearInterval(fe),fe=null)},it=()=>{document.hidden?Ke():(ke(),Be())};return document.addEventListener("visibilitychange",it),Be(),()=>{Ke(),document.removeEventListener("visibilitychange",it)}},[e,Qt,se]);const vt=d.useCallback(async()=>{if(!(!e||!B||F||!Y)){Z(!0);try{const fe=await Ee.getConversationDetails(e,{limit:be,before:Y}),ke=Uf(fe);le(ke),W(fe.hasMore??!1),Q(fe.oldestMessageId)}catch(fe){console.error("Failed to load more messages:",fe)}finally{Z(!1)}}},[e,B,F,Y,le]),Bn=async(fe,ke,Be,Ke)=>{if(!e)return;h(null);const it=!Be||Be==="default"?"claude-opus-4-5-20251101":Be;console.log("[TRACE] handleSendMessage called",{currentSessionId:e,message:fe.slice(0,100),providedWorkingDirectory:ke,conversationSummaryPath:j?.projectPath,currentWorkingDirectory:N,willSendWorkingDirectory:void 0,model:it,permissionMode:Ke,timestamp:new Date().toISOString()});const ot=`optimistic-${Date.now()}`;ie({id:ot,messageId:ot,type:"user",content:fe,timestamp:new Date().toISOString()});try{c(!0),console.log("[TRACE] Calling api.startConversation with resumedSessionId:",e);const bt=await Ee.startConversation({resumedSessionId:e,initialPrompt:fe,workingDirectory:void 0,model:it,permissionMode:Ke});console.log("[TRACE] api.startConversation returned:",{newSessionId:bt.sessionId,streamingId:bt.streamingId,model:bt.model}),c(!1),o(bt.streamingId),p(Date.now())}catch(bt){c(!1),I(),bt instanceof Error&&bt.message.includes("Session limit reached")?k(!0):h(bt.message||"Failed to send message")}},rr=async()=>{if(s)try{await Ee.stopConversation(s),nn(),o(null),c(!1),p(null)}catch(fe){console.error("Failed to stop conversation:",fe),h(fe.message||"Failed to stop conversation")}},ae=async()=>{if(e)try{const fe=await Ee.forceKillSession(e);fe.success?(nn(),o(null),c(!1),p(null)):h(fe.error||"Failed to force kill session")}catch(fe){console.error("Failed to force kill session:",fe),h(fe.message||"Failed to force kill session")}},xe=async(fe,ke,Be)=>{if(!w){S(!0);try{await Ee.sendPermissionDecision(fe,{action:ke,denyReason:Be}),ce()}catch(Ke){console.error("Failed to send permission decision:",Ke),h(Ke.message||"Failed to send permission decision")}finally{S(!1)}}},de=async(fe,ke)=>{try{await Ee.sendQuestionAnswer(fe,ke),ge()}catch(Be){console.error("Failed to send question answer:",Be),h(Be.message||"Failed to send question answer")}};return a.jsxs("div",{className:"h-full flex flex-col bg-background relative",role:"main","aria-label":"Conversation view",children:[a.jsx($F,{title:j?.sessionInfo.custom_name||g,sessionId:e,isArchived:j?.sessionInfo.archived||!1,isPinned:j?.sessionInfo.pinned||!1,subtitle:j?{date:new Date(j.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric"}),repo:j.projectPath.split("/").pop()||"project",commitSHA:j.sessionInfo.initial_commit_head,changes:j.toolMetrics?{additions:j.toolMetrics.linesAdded,deletions:j.toolMetrics.linesRemoved}:void 0}:void 0,onTitleUpdate:async fe=>{y(fe),j&&E({...j,sessionInfo:{...j.sessionInfo,custom_name:fe}});try{const Be=(await Ee.getConversations({limit:100})).conversations.find(Ke=>Ke.sessionId===e);if(Be){E(Be);const Ke=Be.sessionInfo.custom_name||Be.summary||"Untitled";y(Ke)}}catch(ke){console.error("Failed to refresh conversation after rename:",ke)}},onPinToggle:async fe=>{j&&E({...j,sessionInfo:{...j.sessionInfo,pinned:fe}})},insightsPanelOpen:_,onToggleInsightsPanel:P}),(m||Kt)&&a.jsx("div",{className:"bg-red-500/10 border-b border-red-500 text-red-600 dark:text-red-400 px-4 py-2 text-sm text-center animate-in slide-in-from-top duration-300",role:"alert","aria-label":"Error message",children:m||Kt}),a.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[a.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[a.jsx(zF,{sessionId:e,messages:K,toolResults:O,childrenMessages:z,expandedTasks:H,onToggleTaskExpanded:oe,isLoading:et,isStreaming:!!s,currentQuestionRequest:T,onAnswerQuestion:de,hasMore:B,isLoadingMore:F,onLoadMore:vt}),a.jsx("div",{className:"sticky bottom-0 bg-white/80 dark:bg-zinc-900/80 backdrop-blur-sm z-10 w-full flex justify-center pt-4 pb-3","aria-label":"Message composer section",children:a.jsx("div",{className:"w-full max-w-5xl px-4",children:a.jsx(r4,{ref:L,onSubmit:Bn,onStop:rr,onForceKill:ae,onPermissionDecision:xe,isLoading:Qt||w,isSessionActive:!!s||Qt,isInitializing:l,sessionStartTime:f??void 0,placeholder:"",permissionRequest:J,showPermissionUI:!0,showStopButton:!0,showDictation:!1,compact:!0,enableFileAutocomplete:!0,workingDirectory:j?.projectPath,onFetchFileSystem:async fe=>{try{return(await Ee.listDirectory({path:fe||N,recursive:!1,respectGitignore:!0})).entries}catch(ke){return console.error("Failed to fetch file system entries:",ke),[]}},onFetchCommands:async fe=>{try{return(await Ee.getCommands(fe||N)).commands}catch(ke){return console.error("Failed to fetch commands:",ke),[]}}})})})]}),a.jsx(BF,{insights:ft,isLoading:Ye,isOpen:_,onClose:()=>{R(!1),localStorage.setItem("insightsPanelOpen","false")},syncState:jt})]}),a.jsx(V4,{isOpen:b,onClose:()=>k(!1)})]})}function Uf(e){const t=new Map;return e.messages.forEach(n=>t.set(n.uuid,n)),e.messages.filter(n=>!n.isSidechain).map(n=>{let s=n.message;return typeof n.message=="object"&&"content"in n.message&&(s=n.message.content),{id:n.uuid,messageId:n.uuid,type:n.type,content:s,timestamp:n.timestamp,workingDirectory:n.cwd}})}const Ix=[{sessionId:"57a80243-86d0-483b-8e32-4a78c4e74a9d",projectPath:"/home/user",messageCount:263,insights:{headline:"Generated sample insights across different session states, now debugging scrollability issue on prototype page",status:{state:"working",detail:"Investigating why the experimental insights page isn't scrollable and preparing diverse session examples"},context:{project:"orchestrator",area:"insight generation system",mission:"Improve dashboard session insights with better prompt and UI",scope:"feature"},tags:{theme:"designing",complexity:"tricky",domain:["UI","prompts","dashboard"]},panels:[{title:"Experiment Progress",icon:"ph:flask",color:"emerald",items:["V4 prompt with metacognitive guidance created","Test harness built and comparisons run","Prototype page showing new format live"]},{title:"User Feedback Loop",icon:"lucide-message-circle",color:"sky",items:["Content quality approved, UI initially 'cramped'","Adjusted to match existing insights styling","Now generating diverse state examples"]}],milestones:[{label:"New prompt designed",status:"done"},{label:"Test harness & experiments",status:"done"},{label:"Prototype UI built",status:"done"},{label:"Style refinements",status:"done"},{label:"Generate diverse examples",status:"current"}]}},{sessionId:"419bddc8-5021-4d7f-9854-1b7de2ae713b",projectPath:"/home/user",messageCount:1212,insights:{headline:"Testing visual diff indicators but updates appear without any visual feedback",status:{state:"blocked",detail:"Visual diff system implemented but not rendering - patches apply silently without the intended highlight/strikethrough effects"},context:{project:"AI session dashboard",area:"InsightsPanel diff visualization",mission:"Build live insight cards that show calm, legible updates with visual diff indicators",scope:"feature"},tags:{theme:"debugging",complexity:"tricky",domain:["UI","real-time updates","UX"]},panels:[{title:"The Problem",icon:"ph:eye-slash",color:"rose",items:["Content updates work correctly","No visual indication when text changes","Strikethrough/highlight never appears","Haiku model refusing to generate patches"]},{title:"Debug Attempts",icon:"lucide-bug",color:"amber",items:["Hard refresh - no effect","Forced Sonnet patches - still invisible","Watching browser console","Backend patch generation confirmed"]}],milestones:[{label:"Event-driven insights system",status:"done"},{label:"Fix race conditions",status:"done"},{label:"Remove polling, add patches",status:"done"},{label:"Visual diff rendering",status:"current"}]}},{sessionId:"930e210c-7f0b-4121-9d84-4aae6512da61",projectPath:"/home/user",messageCount:29,insights:{headline:"Exploring the insight generation codebase to understand how patching works",status:{state:"working",detail:"Actively grepping through anthropic-service.ts and session insights code"},context:{project:"ccx-claude",area:"insight generation system",mission:"Test and understand the insight/patching pipeline",scope:"minor"},tags:{theme:"exploring",complexity:"routine",domain:["LLM integration","session management"]},panels:[{title:"Files Explored",icon:"ph:magnifying-glass",color:"sky",items:["anthropic-service.ts","session insights service","patch generation logic"]},{title:"LLM Methods Found",icon:"ph:robot",color:"purple",items:["computeInsights (Sonnet)","quickCheckInsightsStale (Haiku)","detectInsightsDelta"]}],milestones:[{label:"Initial grep exploration",status:"done"},{label:"Map insight generation flow",status:"current"},{label:"Understand patching mechanism",status:"pending"}]}},{sessionId:"waiting-example",projectPath:"/home/user/my-app",messageCount:42,insights:{headline:"Ready to implement auth but need to know which OAuth provider to use",status:{state:"waiting_for_input",detail:"Asked user to choose between Google, GitHub, or Auth0 - implementation differs significantly"},context:{project:"my-app",area:"authentication",mission:"Add OAuth login to the application",scope:"feature"},tags:{theme:"building",complexity:"tricky",domain:["auth","API","security"]},panels:[{title:"Options Presented",icon:"ph:question",color:"amber",items:["Google OAuth (simplest, most common)","GitHub OAuth (good for dev tools)","Auth0 (most flexible, more setup)"]},{title:"Prep Done",icon:"ph:check-circle",color:"emerald",items:["Reviewed existing user model","Identified callback routes needed","Found next-auth as likely library"]}],milestones:[{label:"Analyze requirements",status:"done"},{label:"Choose OAuth provider",status:"current"},{label:"Implement auth flow",status:"pending"},{label:"Add protected routes",status:"pending"}]}},{sessionId:"593fc253-c85d-4ee0-89db-3d3bf4c971b8",projectPath:"/home/user",messageCount:13,insights:{headline:"Just added Anthropic model ID reference tables to two CLAUDE.md files",status:{state:"finished",detail:"Documentation update complete - added model ID section to both orchestrator and root CLAUDE.md"},context:{project:"cui-custom (orchestrator)",area:"CLAUDE.md documentation",mission:"Keep AI guidelines current with latest Anthropic model IDs",scope:"minor"},tags:{theme:"polishing",complexity:"routine",domain:["docs","config","AI setup"]},panels:[{title:"Files Updated",icon:"ph:file-text",color:"emerald",items:["~/cui-custom/CLAUDE.md","~/CLAUDE.md"]},{title:"Content Added",icon:"lucide-table",color:"sky",items:["Model ID lookup reminder","Claude Haiku 4.5 ID + alias","Claude Sonnet 4.5 ID + alias","Fixed malformed table formatting"]}],milestones:[{label:"Read existing CLAUDE.md structure",status:"done"},{label:"Add to cui-custom/CLAUDE.md",status:"done"},{label:"Add to root CLAUDE.md",status:"done"}]}},{sessionId:"37a630bf-4a6e-4994-9241-7e1cdd985cf2",projectPath:"/home/user/myproject",messageCount:37,insights:{headline:"Fixed a color mapping bug in TaskItem - the dashboard should be working again",status:{state:"finished",detail:"Applied fallback for unknown color values from API; awaiting confirmation it resolved the crash"},context:{project:"cui-custom",area:"TaskItem component",mission:"Debug and fix dashboard crash",scope:"minor"},tags:{theme:"firefighting",complexity:"routine",domain:["UI","React"]},panels:[{title:"The Bug",icon:"ph:bug",color:"rose",items:["getPanelColorClasses returned undefined","API sent 'green', map only had 'emerald'","Caused TypeError on .border access"]},{title:"The Fix",icon:"ph:wrench",color:"emerald",items:["Added fallback to 'slate' for unknown colors","Hot-reload should apply automatically"]}],milestones:[{label:"Error reported",status:"done"},{label:"Root cause identified",status:"done"},{label:"Fix applied",status:"done"},{label:"User confirms working",status:"pending"}]}},{sessionId:"3a195772-4545-40d8-91b1-aae00144fadb",projectPath:"/home/user",messageCount:33,insights:{headline:"CUI dashboard and Claudia are both already running and accessible via Tailscale",status:{state:"finished",detail:"Services confirmed healthy - CUI at http://100.71.28.92:3001"},context:{project:"claudia",area:"deployment/networking",mission:"Access CUI dashboard remotely via Tailscale",scope:"minor"},tags:{theme:"exploring",complexity:"routine",domain:["networking","services","tailscale"]},panels:[{title:"Services Status",icon:"ph:check-circle",color:"emerald",items:["CUI: Running on port 3001","Claudia: Running (agent + heartbeat)","Both started automatically"]},{title:"Access Info",icon:"ph:globe",color:"sky",items:["Tailscale IP: 100.71.28.92","Dashboard: http://100.71.28.92:3001","Accessible from any Tailscale device"]}],milestones:[{label:"Check Claudia status",status:"done"},{label:"Check CUI status",status:"done"},{label:"Verify Tailscale access",status:"done"}]}}];function GF({state:e}){if(e==="working"||e==="finished")return null;const n={waiting_for_input:{color:"bg-amber-400",title:"Needs your input"},blocked:{color:"bg-red-400",title:"Blocked"}}[e];return n?a.jsx("span",{className:`w-2 h-2 rounded-full ${n.color} animate-pulse`,title:n.title}):null}function KF({data:e}){const{insights:t}=e,{headline:n,status:s,context:o,tags:l,panels:c,milestones:f}=t;return a.jsx("div",{className:"border-b border-border/20 hover:bg-card/80 transition-colors",children:a.jsxs("div",{className:"px-4 pt-4 pb-5",children:[a.jsxs("div",{className:"text-[11px] text-muted-foreground/50 uppercase tracking-wider mb-1 flex items-center gap-1.5",children:[a.jsx(GF,{state:s.state}),a.jsx("span",{children:o.project}),o.area&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-muted-foreground/30",children:"›"}),a.jsx("span",{children:o.area})]})]}),a.jsx("div",{className:"text-base text-foreground font-semibold line-clamp-2 leading-snug",children:n}),(o.scope||l.theme||l.complexity&&l.complexity!=="routine")&&a.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[o.scope&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${o.scope==="major"?"bg-purple-500/20 text-purple-400":o.scope==="feature"?"bg-blue-500/20 text-blue-400":"bg-muted/30 text-muted-foreground/70"}`,children:o.scope}),l.theme&&a.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground/70 font-medium",children:l.theme}),l.complexity&&l.complexity!=="routine"&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${l.complexity==="gnarly"?"bg-red-500/20 text-red-400":"bg-amber-500/20 text-amber-400"}`,children:l.complexity})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:c.slice(0,2).map((p,m)=>{const h=hn(p.color||"slate");return a.jsxs("div",{className:`border ${h.border} rounded-lg p-4 ${h.bg}`,children:[a.jsxs("div",{className:`text-xs uppercase tracking-wider ${h.text} mb-3 flex items-center gap-2`,children:[p.icon&&a.jsx(We,{name:p.icon,size:14,className:h.icon}),p.title]}),a.jsx("div",{className:"space-y-1.5",children:p.items?.slice(0,5).map((g,y)=>a.jsxs("div",{className:"text-sm text-foreground/70 flex items-start gap-2",children:[a.jsx("span",{className:"text-muted-foreground/40 shrink-0 mt-0.5",children:"•"}),a.jsx("span",{className:"line-clamp-2",children:typeof g=="string"?g:g.text})]},y))})]},m)})}),f.length>0&&a.jsxs("div",{className:"mt-4 border border-border/30 rounded-lg p-5 bg-card/20",children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-4",children:"Progress"}),a.jsx("div",{className:"space-y-3",children:f.slice(0,4).map((p,m)=>a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full text-xs ${p.status==="done"?"bg-green-500/20 text-green-400":p.status==="current"?"bg-accent/20 text-accent":"bg-muted/20 text-muted-foreground/40"}`,children:p.status==="done"?"✓":p.status==="current"?"→":"○"}),a.jsx("span",{className:`text-sm ${p.status==="done"?"text-muted-foreground/50":p.status==="current"?"text-foreground":"text-muted-foreground/40"}`,children:p.label})]},m))})]})]})})}function QF({data:e}){const{insights:t}=e,{context:n,tags:s,panels:o,milestones:l}=t;return a.jsx("div",{className:"border-b border-border/20 hover:bg-card/80 transition-colors",children:a.jsxs("div",{className:"px-4 pt-4 pb-5",children:[a.jsxs("div",{className:"text-[11px] text-muted-foreground/50 uppercase tracking-wider mb-1 flex items-center gap-1.5",children:[a.jsx("span",{children:n.project}),n.area&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-muted-foreground/30",children:"›"}),a.jsx("span",{children:n.area})]})]}),a.jsx("div",{className:"text-base text-foreground font-semibold line-clamp-2 leading-snug",children:n.mission}),(n.scope||s.theme||s.complexity&&s.complexity!=="routine")&&a.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[n.scope&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${n.scope==="major"?"bg-purple-500/20 text-purple-400":n.scope==="feature"?"bg-blue-500/20 text-blue-400":"bg-muted/30 text-muted-foreground/70"}`,children:n.scope}),s.theme&&a.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground/70 font-medium",children:s.theme}),s.complexity&&s.complexity!=="routine"&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${s.complexity==="gnarly"?"bg-red-500/20 text-red-400":"bg-amber-500/20 text-amber-400"}`,children:s.complexity})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:o.slice(0,2).map((c,f)=>{const p=hn(c.color||"slate");return a.jsxs("div",{className:`border ${p.border} rounded-lg p-4 ${p.bg}`,children:[a.jsxs("div",{className:`text-xs uppercase tracking-wider ${p.text} mb-3 flex items-center gap-2`,children:[c.icon&&a.jsx(We,{name:c.icon,size:14,className:p.icon}),c.title]}),a.jsx("div",{className:"space-y-1.5",children:c.items?.slice(0,5).map((m,h)=>a.jsxs("div",{className:"text-sm text-foreground/70 flex items-start gap-2",children:[a.jsx("span",{className:"text-muted-foreground/40 shrink-0 mt-0.5",children:"•"}),a.jsx("span",{className:"line-clamp-2",children:typeof m=="string"?m:m.text})]},h))})]},f)})}),l.length>0&&a.jsxs("div",{className:"mt-4 border border-border/30 rounded-lg p-5 bg-card/20",children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-4",children:"Progress"}),a.jsx("div",{className:"space-y-3",children:l.slice(0,4).map((c,f)=>a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full text-xs ${c.status==="done"?"bg-green-500/20 text-green-400":c.status==="current"?"bg-accent/20 text-accent":"bg-muted/20 text-muted-foreground/40"}`,children:c.status==="done"?"✓":c.status==="current"?"→":"○"}),a.jsx("span",{className:`text-sm ${c.status==="done"?"text-muted-foreground/50":c.status==="current"?"text-foreground":"text-muted-foreground/40"}`,children:c.label})]},f))})]})]})})}function YF(){return a.jsx("div",{className:"h-screen bg-background p-8 overflow-y-auto",children:a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Insight Format Prototype"}),a.jsx("p",{className:"text-muted-foreground mb-8",children:"Comparing current format (left) with V4 (right). Same visual design, better content: headline shows current situation instead of goal, subtle status dot for blocked/waiting."}),a.jsxs("div",{className:"flex items-center gap-6 mb-8 p-4 bg-card rounded-lg border border-border",children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Status dots (only shown when attention needed):"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-400 animate-pulse"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"Needs input"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"w-2 h-2 rounded-full bg-red-400 animate-pulse"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"Blocked"})]}),a.jsx("div",{className:"flex items-center gap-2",children:a.jsx("span",{className:"text-sm text-muted-foreground/50",children:"(no dot = working or finished)"})})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[a.jsxs("div",{children:[a.jsxs("h2",{className:"text-lg font-semibold text-foreground mb-4 flex items-center gap-2",children:[a.jsx("span",{className:"px-2 py-0.5 rounded bg-muted text-muted-foreground text-sm",children:"Current"}),"Mission as headline, no status"]}),a.jsx("div",{className:"border border-border rounded-lg overflow-hidden bg-card/30",children:Ix.map(e=>a.jsx(QF,{data:e},e.sessionId))})]}),a.jsxs("div",{children:[a.jsxs("h2",{className:"text-lg font-semibold text-foreground mb-4 flex items-center gap-2",children:[a.jsx("span",{className:"px-2 py-0.5 rounded bg-emerald-500/20 text-emerald-400 text-sm",children:"V4 Proposed"}),"Headline (situational) + subtle status dot"]}),a.jsx("div",{className:"border border-border rounded-lg overflow-hidden bg-card/30",children:Ix.map(e=>a.jsx(KF,{data:e},e.sessionId))})]})]})]})})}const XF=[{sessionId:"57a80243-86d0-483b-8e32-4a78c4e74a9d",label:"Insight Prompt Design",totalMessages:318,slices:{t1:{messageCount:127,percentage:"40%"},t2:{messageCount:222,percentage:"70%"},t3:{messageCount:318,percentage:"100%"}},evolution:{t1:{insights:{headline:"Iterating on insight generation prompt after experimental testing",status:{state:"waiting_for_input",detail:"Awaiting approval before implementing changes"},context:{project:"orchestrator-dashboard",area:"insight generation",mission:"improve multi-session overview cards with better metacognitive guidance",scope:"feature"},progress:[{phase:"understand current prompt",status:"done"},{phase:"brainstorm improvements",status:"done"},{phase:"experimental testing",status:"done"},{phase:"design operational states",status:"current"},{phase:"implementation",status:"pending"}],panels:[{title:"Key Discoveries",icon:"ph:lightbulb",color:"amber",items:["Original prompt too prescriptive","Tags provide good triage signal","workType redundant with theme"]},{title:"Proposed Changes",icon:"ph:arrows-clockwise",color:"sky",items:["Replace 'attention' with operational state","Add metacognitive guidance","Keep tags UI"]}],tags:{theme:"designing",complexity:"tricky"}}},t2:{insights:{headline:"Matching prototype UI to existing card style after stakeholder feedback",status:{state:"working",detail:"Iterating styling to match existing TaskItem design"},context:{project:"orchestrator-dashboard",area:"insight generation",mission:"improve multi-session overview cards with better metacognitive guidance",scope:"feature"},progress:[{phase:"understand current prompt",status:"done"},{phase:"brainstorm improvements",status:"done"},{phase:"experimental testing",status:"done"},{phase:"design operational states",status:"done"},{phase:"implementation",status:"current"}],panels:[{title:"Key Discoveries",icon:"ph:lightbulb",color:"amber",items:["Original prompt too prescriptive","Tags provide good triage signal","workType redundant with theme"]},{title:"Prototype Feedback",icon:"ph:chat-circle-dots",color:"emerald",items:["Content quality validated","Initial UI too cramped","Iterating to match TaskItem.tsx styling"]}],tags:{theme:"designing",complexity:"tricky"}}},t3:{insights:{headline:"Designing temporal evolution strategy for insights through slice-and-patch experiments",status:{state:"working",detail:"Building experiment harness to test patching workflow"},context:{project:"orchestrator-dashboard",area:"insight generation",mission:"improve multi-session overview cards with better metacognitive guidance",scope:"feature"},progress:[{phase:"understand current prompt",status:"done"},{phase:"brainstorm improvements",status:"done"},{phase:"experimental testing",status:"done"},{phase:"design operational states",status:"done"},{phase:"implementation",status:"done"},{phase:"design evolution strategy",status:"current"}],panels:[{title:"Key Discoveries",icon:"ph:lightbulb",color:"amber",items:["Original prompt too prescriptive","Tags provide good triage signal","V5 needs temporal awareness","Scrolling issue traced to layout"]},{title:"Evolution Design Goals",icon:"ph:arrows-clockwise",color:"sky",items:["Two-tier system: initial → patches → regeneration","Progress panel patches incrementally","Avoid ephemeral details"]}],tags:{theme:"designing",complexity:"tricky"}}}}},{sessionId:"0dd4546e-6ba1-4e86-9ca1-6199045bf424",label:"Tool Call Rendering Fix",totalMessages:165,slices:{t1:{messageCount:66,percentage:"40%"},t2:{messageCount:115,percentage:"70%"},t3:{messageCount:165,percentage:"100%"}},evolution:{t1:{insights:{headline:"Fixing invisible tool calls in orchestrator dashboard",status:{state:"working",detail:"Applied fix to ToolContent.tsx, guiding through build cycle"},context:{project:"orchestrator dashboard",area:"tool call rendering",mission:"Fix tool calls appearing as empty divs",scope:"minor"},progress:[{phase:"Reproduce & diagnose",status:"done"},{phase:"Identify root cause",status:"done"},{phase:"Apply fix",status:"done"},{phase:"Build & verify",status:"current"},{phase:"Confirm resolution",status:"pending"}],panels:[{title:"Bug Details",icon:"lucide-bug",color:"rose",items:["Tool calls render as empty divs","Only tool calls affected","Issue visible when session active"]},{title:"Fix Applied",icon:"lucide-wrench",color:"emerald",items:["Modified ToolContent.tsx","Tool results update reactively"]}],tags:{theme:"debugging",complexity:"tricky"}}},t2:{insights:{headline:"Adding markdown table support to orchestrator dashboard",status:{state:"working",detail:"Installing remark-gfm plugin and integrating"},context:{project:"orchestrator dashboard",area:"tool call rendering",mission:"Fix tool calls appearing as empty divs",scope:"minor"},progress:[{phase:"Reproduce & diagnose",status:"done"},{phase:"Identify root cause",status:"done"},{phase:"Apply fix",status:"done"},{phase:"Build & verify",status:"done"},{phase:"Confirm resolution",status:"done"},{phase:"Add markdown table support",status:"current"},{phase:"Test tables",status:"pending"}],panels:[{title:"Original Fix - Verified",icon:"lucide-check-circle",color:"emerald",items:["Tool calls now render correctly","Fix successful after refresh"]},{title:"New Feature: Tables",icon:"lucide-table",color:"sky",items:["Tables render as plain text currently","Installing remark-gfm plugin","Will match dashboard styling"]}],tags:{theme:"building",complexity:"routine"}}},t3:{insights:{headline:"Markdown table support successfully added to dashboard",status:{state:"finished",detail:"Feature working, removing debug logging"},context:{project:"orchestrator dashboard",area:"tool call rendering",mission:"Fix tool calls appearing as empty divs",scope:"minor"},progress:[{phase:"Reproduce & diagnose",status:"done"},{phase:"Identify root cause",status:"done"},{phase:"Apply fix",status:"done"},{phase:"Build & verify",status:"done"},{phase:"Confirm resolution",status:"done"},{phase:"Add markdown table support",status:"done"},{phase:"Test tables",status:"done"},{phase:"Clean up logging",status:"current"}],panels:[{title:"Original Fix - Verified",icon:"lucide-check-circle",color:"emerald",items:["Tool calls render correctly","Fix successful after refresh"]},{title:"Table Support - Completed",icon:"lucide-table",color:"emerald",items:["remark-gfm integrated","Tables styled with dashboard theme","Removing debug logging"]}],tags:{theme:"polishing",complexity:"routine"}}}}},{sessionId:"419bddc8-5021-4d7f-9854-1b7de2ae713b",label:"Real-time Insights System",totalMessages:1212,slices:{t1:{messageCount:484,percentage:"40%"},t2:{messageCount:848,percentage:"70%"},t3:{messageCount:1212,percentage:"100%"}},evolution:{t1:{insights:{headline:"Designing intelligent session insight refresh system",status:{state:"waiting_for_input",detail:"Awaiting decision on when to first generate insights"},context:{project:"cui-custom",area:"session insights",mission:"implement intelligent snapshot system with delta patching",scope:"feature"},progress:[{phase:"understanding current state",status:"done"},{phase:"designing delta pattern",status:"done"},{phase:"defining refresh strategy",status:"current"},{phase:"implementation",status:"pending"}],panels:[{title:"Proposed Design",icon:"lucide-git-branch",color:"sky",items:["Initial: Full extraction on start","Every 10s: Haiku checks if patch needed","Patch: Sonnet reviews last 10 actions"]},{title:"Key Decisions",icon:"lucide-help-circle",color:"amber",items:["When to FIRST generate insights?","How to handle 'currently live' indicator?"]}],tags:{theme:"designing",complexity:"tricky"}}},t2:{insights:{headline:"Testing session insights system with live delta patching",status:{state:"working",detail:"System working end-to-end, debugging UI feedback"},context:{project:"cui-custom",area:"session insights",mission:"implement intelligent snapshot system with delta patching",scope:"feature"},progress:[{phase:"understanding current state",status:"done"},{phase:"designing delta pattern",status:"done"},{phase:"defining refresh strategy",status:"done"},{phase:"implementation",status:"done"},{phase:"testing & debugging",status:"current"}],panels:[{title:"System Working",icon:"lucide-check-circle",color:"emerald",items:["✓ Initial generation at 10 actions","✓ Haiku quick checks running","✓ SSE events wired up"]},{title:"Debug Focus",icon:"lucide-bug",color:"rose",items:["UI not showing visual feedback","Need to verify SSE reaching frontend","Investigating event flow"]}],tags:{theme:"debugging",complexity:"tricky"}}},t3:{insights:{headline:"Production-ready insights system with visual diff feedback",status:{state:"working",detail:"Implementing subtle update indicators"},context:{project:"cui-custom",area:"session insights",mission:"implement intelligent snapshot system with delta patching",scope:"feature"},progress:[{phase:"understanding current state",status:"done"},{phase:"designing delta pattern",status:"done"},{phase:"defining refresh strategy",status:"done"},{phase:"implementation",status:"done"},{phase:"testing & debugging",status:"done"},{phase:"production polish",status:"current"}],panels:[{title:"System Validated",icon:"lucide-check-circle",color:"emerald",items:["✓ End-to-end patch system working","✓ Haiku making smart decisions","✓ Content updating in real-time"]},{title:"Calm UX Focus",icon:"lucide-sparkles",color:"sky",items:["'Updated Xm ago' indicator","Subtle 'Updating...' state","Visual diff feedback design"]}],tags:{theme:"polishing",complexity:"tricky"}}}}}];function JF({state:e}){const t=e.replace(/_/g," "),n={working:{bg:"bg-blue-500/20",text:"text-blue-400"},waiting_for_input:{bg:"bg-amber-500/20",text:"text-amber-400"},"waiting for input":{bg:"bg-amber-500/20",text:"text-amber-400"},blocked:{bg:"bg-red-500/20",text:"text-red-400"},finished:{bg:"bg-emerald-500/20",text:"text-emerald-400"},completing:{bg:"bg-emerald-500/20",text:"text-emerald-400"},testing:{bg:"bg-purple-500/20",text:"text-purple-400"},running:{bg:"bg-blue-500/20",text:"text-blue-400"}},s=n[e]||n[t]||{bg:"bg-muted/30",text:"text-muted-foreground"};return a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${s.bg} ${s.text}`,children:t})}function Zf({insights:e,timeLabel:t,messageCount:n}){const{headline:s,status:o,context:l,progress:c,panels:f,tags:p}=e;return a.jsxs("div",{className:"border border-border/30 rounded-lg bg-card/20 overflow-hidden",children:[a.jsx("div",{className:"px-4 py-3 border-b border-border/20 bg-card/40",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:t}),a.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["(",n," msgs)"]})]}),a.jsx(JF,{state:o.state})]})}),a.jsxs("div",{className:"px-4 pt-3 pb-4",children:[a.jsx("div",{className:"text-sm text-foreground font-medium leading-snug mb-3",children:s}),a.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:c.slice(0,6).map((m,h)=>a.jsx("div",{className:`text-xs px-2 py-0.5 rounded ${m.status==="done"?"bg-emerald-500/10 text-emerald-400/70":m.status==="current"?"bg-blue-500/20 text-blue-400 font-medium":"bg-muted/20 text-muted-foreground/40"}`,children:m.phase},h))}),a.jsx("div",{className:"space-y-2",children:f.slice(0,2).map((m,h)=>{const g=hn(m.color||"slate");return a.jsxs("div",{className:`rounded p-2 ${g.bg} border ${g.border}`,children:[a.jsxs("div",{className:`text-xs font-medium ${g.text} mb-1 flex items-center gap-1.5`,children:[m.icon&&a.jsx(We,{name:m.icon,size:12}),m.title]}),a.jsx("div",{className:"text-xs text-foreground/60 space-y-0.5",children:m.items?.slice(0,3).map((y,b)=>a.jsxs("div",{className:"truncate",children:["• ",y]},b))})]},h)})})]})]})}function eO({data:e}){return a.jsxs("div",{className:"mb-8",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx("h3",{className:"text-lg font-semibold text-foreground",children:e.label}),a.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.totalMessages," total messages"]}),a.jsxs("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground font-mono",children:[e.sessionId.slice(0,8),"..."]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[a.jsx(Zf,{insights:e.evolution.t1.insights,timeLabel:`T1 (${e.slices.t1.percentage})`,messageCount:e.slices.t1.messageCount}),a.jsx(Zf,{insights:e.evolution.t2.insights,timeLabel:`T2 (${e.slices.t2.percentage})`,messageCount:e.slices.t2.messageCount}),a.jsx(Zf,{insights:e.evolution.t3.insights,timeLabel:`T3 (${e.slices.t3.percentage})`,messageCount:e.slices.t3.messageCount})]}),a.jsxs("div",{className:"mt-3 flex items-center gap-4 text-xs text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(gc,{size:12}),a.jsxs("span",{children:["Progress phases: ",e.evolution.t1.insights.progress.length," → ",e.evolution.t3.insights.progress.length]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(gc,{size:12}),a.jsxs("span",{children:["Status: ",e.evolution.t1.insights.status.state," → ",e.evolution.t3.insights.status.state]})]})]})]})}function tO(){return a.jsx("div",{className:"h-screen bg-background p-8 overflow-y-auto",children:a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Insight Evolution Prototype"}),a.jsx("p",{className:"text-muted-foreground mb-2",children:"Simulating how insights evolve over time through the patching workflow. Each session is sliced at 40% → 70% → 100% of messages."}),a.jsxs("p",{className:"text-sm text-muted-foreground/70 mb-8",children:[a.jsx("strong",{children:"Key observations:"})," Progress phases stay stable (labels don't change, only status). Headlines update to reflect current situation. Panels accumulate items or transform as context shifts."]}),XF.map(e=>a.jsx(eO,{data:e},e.sessionId)),a.jsxs("div",{className:"mt-12 border-t border-border/30 pt-8",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground mb-4",children:"What We Learned"}),a.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[a.jsxs("div",{className:"p-4 rounded-lg bg-emerald-500/5 border border-emerald-500/20",children:[a.jsx("h3",{className:"text-sm font-medium text-emerald-400 mb-2",children:"What Patches Well"}),a.jsxs("ul",{className:"text-sm text-foreground/70 space-y-1",children:[a.jsx("li",{children:"• Progress phase status (done/current/pending)"}),a.jsx("li",{children:"• Headline (current situation)"}),a.jsx("li",{children:"• Panel items (append new discoveries)"}),a.jsx("li",{children:"• Status state + detail"})]})]}),a.jsxs("div",{className:"p-4 rounded-lg bg-amber-500/5 border border-amber-500/20",children:[a.jsx("h3",{className:"text-sm font-medium text-amber-400 mb-2",children:"What Transforms"}),a.jsxs("ul",{className:"text-sm text-foreground/70 space-y-1",children:[a.jsx("li",{children:"• Panels can swap when context shifts"}),a.jsx("li",{children:"• New phases can be added to progress"}),a.jsx("li",{children:"• Theme can change (debugging → polishing)"}),a.jsx("li",{children:"• Panel titles can evolve"})]})]}),a.jsxs("div",{className:"p-4 rounded-lg bg-sky-500/5 border border-sky-500/20",children:[a.jsx("h3",{className:"text-sm font-medium text-sky-400 mb-2",children:"What Stays Stable"}),a.jsxs("ul",{className:"text-sm text-foreground/70 space-y-1",children:[a.jsx("li",{children:"• Context (project, mission, scope)"}),a.jsx("li",{children:"• Existing progress phase labels"}),a.jsx("li",{children:"• Overall structure of the card"})]})]})]})]})]})})}const nO=[{sessionId:"57a80243-86d0-483b-8e32-4a78c4e74a9d",label:"Insight Prompt Design (this session)",totalMessages:366,current:{context:{project:"orchestrator-dashboard",area:"insight-generation",mission:"Improve session insight prompt to better surface metacognitive context for multi-session management",scope:"feature"},theme:"designing",tags:{complexity:"tricky"},panels:[{title:"Design Philosophy",icon:"brain",color:"purple",items:[{text:"Temporal awareness: insights evolve as sessions progress",icon:"clock"},{text:"Milestone stability: status changes, labels stay fixed",icon:"git-branch"},{text:"Patch-friendly: recent actions roll, panels accumulate",icon:"layers"}]},{title:"Experimental Approach",icon:"flask-conical",color:"sky",items:[{text:"Slice sessions at 40%/70%/100% for evolution testing",icon:"scissors"},{text:"Compare current prompt vs V6 temporal prompt",icon:"git-compare"},{text:"Measure milestone stability through patches",icon:"check-circle"}]}],milestones:[{label:"Review existing insight system",status:"done"},{label:"Design V6 temporal prompt",status:"done"},{label:"Run slice-and-patch experiments",status:"done"},{label:"Build comparison prototype",status:"current"},{label:"Finalize and implement",status:"pending"}],notable:[{type:"breakthrough",description:"Temporal framing produces more stable milestone labels"},{type:"decision",description:"Keep current UI - only change prompt and patching logic"}],recentActions:["Generated V6 comparison experiments for 3 sessions","Analyzed milestone stability through T1→T2→T3 evolution","Building prototype page using real TaskItem UI layout"]},v6:{context:{project:"orchestrator-dashboard",area:"insight-generation",mission:"Refine session insight prompt to surface metacognitive status and actionable context",scope:"feature"},theme:"experimenting",tags:{complexity:"tricky"},panels:[{title:"Design Philosophy",icon:"brain",color:"purple",items:[{text:"Avoid over-prescription - let models find patterns naturally",icon:"shield-alert"},{text:"Surface metacognitive status (active/blocked/waiting/done)",icon:"activity"},{text:"Optimize for multi-session management at a glance",icon:"layout-grid"},{text:"Design for incremental updates as sessions evolve",icon:"git-branch"}]},{title:"Experimental Method",icon:"flask-conical",color:"sky",items:["Query real historical session data from DB","Run old vs new prompt on same inputs","Compare outputs for quality and utility","Iterate based on findings"]}],milestones:[{label:"Review existing prompt",status:"done"},{label:"Identify improvement vectors",status:"done"},{label:"Build test harness with real data",status:"done"},{label:"Run comparative experiments",status:"done"},{label:"Implement refined prompt",status:"current"}],notable:[{type:"decision",description:"Chose experimental approach over direct implementation"},{type:"correction",description:"Pushed back on prescriptive constraints"}],recentActions:["Running V6 experiments on 3 real sessions","Comparing milestone stability between current and V6","Preparing comparison prototype for review"]}},{sessionId:"0dd4546e-6ba1-4e86-9ca1-6199045bf424",label:"Tool Call Rendering Fix",totalMessages:165,current:{context:{project:"orchestrator dashboard",area:"message rendering",mission:"Fix missing tool calls in UI and add markdown table rendering support",scope:"minor"},theme:"polishing",tags:{complexity:"routine"},panels:[{title:"Session Arc",icon:"ph:path",color:"slate",items:["Started: tool calls rendering as empty divs","Mystery: issue vanished on its own during testing","Pivoted to: markdown tables unreadable","Delivered: styled tables matching dashboard theme"]},{title:"Table Styling Added",icon:"ph:table",color:"emerald",items:[{text:"Rounded borders",icon:"ph:square"},{text:"Subtle backgrounds",icon:"ph:paint-bucket"},{text:"Header row highlighting",icon:"ph:text-aa"},{text:"Row hover states",icon:"ph:cursor-click"}]}],milestones:[{label:"Investigate empty tool call divs",status:"done"},{label:"Tool calls rendering verified working",status:"done"},{label:"Add markdown table support",status:"done"},{label:"Style tables to match dashboard",status:"done"},{label:"Clean up debugging artifacts",status:"done"}],notable:[{type:"pivot",description:"Original bug disappeared - pivoted to table styling"},{type:"fix",description:"Fixed duplicate component definitions in ReactMarkdown"}],recentActions:["Removed console logging from table renderer","Verified table styling matches dashboard theme","Cleaned up duplicate component definitions","Tested markdown table rendering with sample data"]},v6:{context:{project:"orchestrator dashboard",area:"tool-rendering",mission:"Fix tool calls appearing as empty divs and improve markdown rendering",scope:"minor"},theme:"debugging",tags:{complexity:"routine"},panels:[{title:"Bug Investigation",icon:"bug",color:"amber",items:["Tool calls appearing as empty nested divs","Only data attributes visible, no content","Messages render fine, tool calls don't"]},{title:"Resolution",icon:"check-circle",color:"emerald",items:[{text:"Modified ToolContent.tsx self-contained rendering",icon:"file-code"},{text:"Added remark-gfm for table support",icon:"table"},{text:"Styled tables to match dashboard theme",icon:"palette"}]}],milestones:[{label:"Identify rendering issue",status:"done"},{label:"Fix ToolContent.tsx rendering logic",status:"done"},{label:"Verify fix works",status:"done"},{label:"Add markdown table support",status:"done"}],notable:[{type:"fix",description:"Tool calls now render with proper content"},{type:"decision",description:"Added markdown table support while fixing rendering"}],recentActions:["Implemented custom table components with dashboard styling","Fixed duplicate table component definitions","Removed console logging after verification","Verified tables display correctly"]}},{sessionId:"419bddc8-5021-4d7f-9854-1b7de2ae713b",label:"Real-time Insights System",totalMessages:1212,current:{context:{project:"cui-custom",area:"session-insights",mission:"Build an intelligent insight patching system with real-time visual updates",scope:"feature"},theme:"polishing",tags:{complexity:"tricky"},panels:[{title:"System Architecture",icon:"layers",color:"sky",items:[{text:"Event-driven insights via SSE",icon:"radio"},{text:"Haiku quick-check for staleness",icon:"zap"},{text:"Sonnet generates targeted patches",icon:"git-merge"},{text:"Visual diff for update visibility",icon:"eye"}]},{title:"UX Vision",icon:"sparkles",color:"purple",items:["Calm cards with 'Updated Xm ago' timestamp","'Updating...' indicator before changes","New text highlights then fades","Removed text strikes through then fades"]}],milestones:[{label:"Design intelligent patching system",status:"done"},{label:"Implement event-driven updates",status:"done"},{label:"Fix initialization race conditions",status:"done"},{label:"Visual diff animations",status:"done"},{label:"Production cleanup",status:"current"}],notable:[{type:"breakthrough",description:"Event-driven architecture eliminates polling"},{type:"fix",description:"Solved singleton initialization race condition"}],recentActions:["Testing visual diff with forced Sonnet patches","Debugging why animations aren't visible","Cleaning up old polling code"]},v6:{context:{project:"cui-custom",area:"session-insights",mission:"Implement intelligent session insight refresh with event-driven patching",scope:"feature"},theme:"debugging",tags:{complexity:"tricky"},panels:[{title:"System Design",icon:"git-branch",color:"sky",items:[{text:"Initial: Full LLM extraction on session start",icon:"rocket"},{text:"Every 10s: Haiku checks if patch needed",icon:"clock"},{text:"Patch: Sonnet reviews recent actions",icon:"git-merge"},{text:"Full regen: Every 5 minutes if needed",icon:"refresh-cw"}]},{title:"Current Challenge",icon:"bug",color:"amber",items:["Visual diff indicators not showing","Patches apply but updates invisible","Testing with forced Sonnet patches"]}],milestones:[{label:"Understand current system & define requirements",status:"done"},{label:"Design intelligent patching architecture",status:"done"},{label:"Implement core event-driven system",status:"done"},{label:"Debug visual feedback system",status:"current"},{label:"Production polish and cleanup",status:"pending"}],notable:[{type:"decision",description:"Event-driven over polling for real-time updates"},{type:"blocker",description:"Visual diff CSS not applying despite content changes"}],recentActions:["Forcing Sonnet patches for testing","Watching browser console for patch events","Investigating why CSS animations not firing"]}}];function rO(e){switch(e){case"error":return a.jsx(We,{name:"alert-circle",size:14,className:"text-red-400"});case"fix":return a.jsx(We,{name:"check-circle",size:14,className:"text-emerald-400"});case"blocker":return a.jsx(We,{name:"ph:prohibit",size:14,className:"text-amber-400"});case"decision":return a.jsx(We,{name:"ph:signpost",size:14,className:"text-purple-400"});case"breakthrough":return a.jsx(We,{name:"ph:lightning",size:14,className:"text-yellow-400"});case"pivot":return a.jsx(We,{name:"ph:arrows-split",size:14,className:"text-sky-400"});case"correction":return a.jsx(We,{name:"ph:arrow-bend-up-right",size:14,className:"text-orange-400"});default:return a.jsx(We,{name:"circle",size:14,className:"text-muted-foreground"})}}function sO(e){return e.toLowerCase().includes("test")||e.toLowerCase().includes("verif")?a.jsx(We,{name:"ph:flask",size:14,className:"text-purple-400"}):e.toLowerCase().includes("debug")||e.toLowerCase().includes("investigat")?a.jsx(We,{name:"bug",size:14,className:"text-amber-400"}):e.toLowerCase().includes("fix")||e.toLowerCase().includes("resolved")?a.jsx(We,{name:"check-circle",size:14,className:"text-emerald-400"}):e.toLowerCase().includes("build")||e.toLowerCase().includes("implement")||e.toLowerCase().includes("add")?a.jsx(We,{name:"hammer",size:14,className:"text-sky-400"}):e.toLowerCase().includes("clean")||e.toLowerCase().includes("remov")?a.jsx(We,{name:"trash",size:14,className:"text-slate-400"}):a.jsx(We,{name:"arrow-right",size:14,className:"text-accent"})}function Px({data:e,label:t}){const{context:n,theme:s,tags:o,panels:l,milestones:c,notable:f,recentActions:p}=e;return a.jsxs("div",{className:"border-b border-border/20",children:[a.jsx("div",{className:"px-4 pt-3 pb-1",children:a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${t==="Current"?"bg-muted text-muted-foreground":"bg-emerald-500/20 text-emerald-400"}`,children:t})}),a.jsxs("div",{className:"px-4 pt-2 pb-5",children:[n?.project&&a.jsxs("div",{className:"text-[11px] text-muted-foreground/50 uppercase tracking-wider mb-1 flex items-center gap-1.5",children:[a.jsx("span",{children:n.project}),n.area&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-muted-foreground/30",children:"›"}),a.jsx("span",{children:n.area})]})]}),a.jsx("div",{className:"text-base text-foreground font-semibold line-clamp-2 leading-snug",children:n.mission}),(n?.scope||s||o?.complexity&&o.complexity!=="routine")&&a.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[n?.scope&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${n.scope==="major"?"bg-purple-500/20 text-purple-400":n.scope==="feature"?"bg-blue-500/20 text-blue-400":"bg-muted/30 text-muted-foreground/70"}`,children:n.scope}),s&&a.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground/70 font-medium",children:s}),o?.complexity&&o.complexity!=="routine"&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${o.complexity==="gnarly"?"bg-red-500/20 text-red-400":"bg-amber-500/20 text-amber-400"}`,children:o.complexity})]}),a.jsxs("div",{className:"mt-4 space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_1fr] gap-6",children:[c?.length>0&&a.jsxs("div",{className:"border border-border/30 rounded-lg p-5 bg-card/20",children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-4",children:"Progress"}),a.jsx("div",{className:"space-y-3",children:c.map((m,h)=>a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full text-xs ${m.status==="done"?"bg-green-500/20 text-green-400":m.status==="current"?"bg-accent/20 text-accent":"bg-muted/20 text-muted-foreground/40"}`,children:m.status==="done"?"✓":m.status==="current"?"→":"○"}),a.jsx("span",{className:`text-sm ${m.status==="done"?"text-muted-foreground/50":m.status==="current"?"text-foreground":"text-muted-foreground/40"}`,children:m.label})]},h))})]}),a.jsxs("div",{className:"space-y-5",children:[p?.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-accent/60 mb-3",children:"Recent"}),a.jsx("div",{className:"space-y-2",children:p.slice(0,3).map((m,h)=>a.jsxs("div",{className:"flex items-start gap-2.5 text-sm text-foreground/60",children:[a.jsx("span",{className:"mt-1 flex-shrink-0",children:sO(m)}),a.jsx("span",{className:"line-clamp-1",children:m})]},h))})]}),f?.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-3",children:"Notable"}),a.jsx("div",{className:"space-y-2.5",children:f.slice(0,3).map((m,h)=>a.jsxs("div",{className:"flex items-start gap-2.5 text-sm text-foreground/60",children:[a.jsx("span",{className:"mt-1 flex-shrink-0",children:rO(m.type)}),a.jsx("span",{className:"line-clamp-2",children:m.description})]},h))})]})]})]}),l?.length>0&&a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:l.map((m,h)=>{const g=hn(m.color);return a.jsxs("div",{className:`border ${g.border} rounded-lg p-4 ${g.bg}`,children:[a.jsxs("div",{className:`text-xs uppercase tracking-wider ${g.text} mb-3 flex items-center gap-2`,children:[m.icon&&a.jsx(We,{name:m.icon,size:14,className:g.icon}),m.title]}),a.jsx("div",{className:"space-y-1.5",children:m.items?.slice(0,5).map((y,b)=>{const k=typeof y=="object"&&y!==null,w=k?y.text:y,S=k?y.icon:void 0;return a.jsxs("div",{className:"text-sm text-foreground/70 flex items-start gap-2",children:[S?a.jsx(We,{name:S,size:12,className:"text-muted-foreground/60 shrink-0 mt-1"}):a.jsx("span",{className:"text-muted-foreground/40 shrink-0 mt-0.5",children:"•"}),a.jsx("span",{className:"line-clamp-2",children:w})]},b)})})]},h)})})]})]})]})}function iO({data:e}){const[t,n]=d.useState(!0);return a.jsxs("div",{className:"mb-8",children:[a.jsxs("button",{onClick:()=>n(!t),className:"w-full flex items-center gap-3 mb-4 text-left hover:bg-card/30 p-2 -ml-2 rounded",children:[t?a.jsx(cn,{size:18}):a.jsx(An,{size:18}),a.jsx("h3",{className:"text-lg font-semibold text-foreground",children:e.label}),a.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.totalMessages," messages"]})]}),t&&a.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[a.jsx("div",{className:"border border-border rounded-lg overflow-hidden bg-card/30",children:a.jsx(Px,{data:e.current,label:"Current Prompt (fresh)"})}),a.jsx("div",{className:"border border-border rounded-lg overflow-hidden bg-card/30",children:a.jsx(Px,{data:e.v6,label:"V6 Prompt (patched)"})})]})]})}function oO(){return a.jsx("div",{className:"h-screen bg-background p-8 overflow-y-auto",children:a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"V6 Prompt Comparison"}),a.jsx("p",{className:"text-muted-foreground mb-2",children:"Comparing current prompt (fresh generation) vs V6 temporal prompt (patched from T1→T2→T3)."}),a.jsxs("p",{className:"text-sm text-muted-foreground/70 mb-8",children:[a.jsx("strong",{children:"Same UI layout"})," - only the content differs. Evaluate which produces better insights."]}),nO.map(e=>a.jsx(iO,{data:e},e.sessionId)),a.jsxs("div",{className:"mt-12 border-t border-border/30 pt-8",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground mb-4",children:"Key Differences"}),a.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[a.jsxs("div",{className:"p-4 rounded-lg bg-muted/20 border border-border/30",children:[a.jsx("h3",{className:"text-sm font-medium text-foreground mb-2",children:"Current Prompt"}),a.jsxs("ul",{className:"text-sm text-foreground/70 space-y-1",children:[a.jsx("li",{children:"• Fresh generation every time"}),a.jsx("li",{children:"• Milestones reflect current state snapshot"}),a.jsx("li",{children:"• No continuity between updates"}),a.jsx("li",{children:"• Each generation is independent"})]})]}),a.jsxs("div",{className:"p-4 rounded-lg bg-emerald-500/5 border border-emerald-500/20",children:[a.jsx("h3",{className:"text-sm font-medium text-emerald-400 mb-2",children:"V6 Prompt (Temporal)"}),a.jsxs("ul",{className:"text-sm text-foreground/70 space-y-1",children:[a.jsx("li",{children:"• Initial generation + incremental patches"}),a.jsx("li",{children:"• Milestones designed as stable plan"}),a.jsx("li",{children:"• Recent actions roll forward naturally"}),a.jsx("li",{children:"• Continuity through session lifetime"})]})]})]})]})]})})}const Qr={totalMessages:458,totalActions:260,initialGenerationThreshold:10,totalChecks:46,skippedChecks:40,patchesGenerated:6,patchRate:"13.0%",timeline:[{frame:0,type:"initial",actionCount:10,messageIndex:17,percentComplete:4,trigger:"Initial generation after 10 actions",insights:{context:{project:"Orchestrator Dashboard",area:"Insight Generation System",mission:"Improving AI session monitoring dashboard intelligence",scope:"feature"},theme:"investigating",tags:{complexity:"medium"},panels:[{title:"Core Challenge",icon:"target",color:"purple",items:[{text:"Dashboard needs better session insight generation",icon:"alert-circle"},{text:"Balance guidance vs. over-prescription",icon:"brain"},{text:"Surface salient info without constraining model",icon:"unlock"}]},{title:"Design Philosophy",icon:"brain",color:"sky",items:[{text:"Avoid prescriptive constraints (LLM attractor basin)",icon:"alert-circle"},{text:"Provide metacognitive guidance instead",icon:"lightbulb"},{text:"Help users manage multiple Claude sessions",icon:"users"}]},{title:"Current Approach",icon:"flask-conical",color:"emerald",items:[{text:"Reviewing existing insight prompt",icon:"ph:book-open"},{text:"Planning iterative experiments",icon:"ph:arrows-clockwise"},{text:"Mining historical prompts from DB",icon:"database"}]}],milestones:[{label:"Review current insight prompt",status:"done"},{label:"Brainstorm improvements",status:"done"},{label:"Access historical data for testing",status:"current"},{label:"Run experimental iterations",status:"pending"},{label:"Deploy improved prompt",status:"pending"}],notable:[{type:"insight",description:"Identified LLM tendency toward over-prescription as key anti-pattern"},{type:"decision",description:"Shift from prescriptive to metacognitive guidance approach"},{type:"pivot",description:"Moving to data-driven experimentation with historical examples"}],recentActions:["Examined insight generation prompt structure","Discussed design principles for non-prescriptive guidance","Investigating DB for historical prompt examples","Setting up experimental framework for prompt iteration"]}},{frame:1,type:"patch",actionCount:15,messageIndex:27,percentComplete:6,trigger:"User discovered important architectural insight: DB stores outputs (cached insights) but not inputs (conversation text).",triggeringAction:"text",actionsSinceLastPatch:5,insights:{context:{project:"Orchestrator Dashboard",area:"Insight Generation System",mission:"Improving AI session monitoring dashboard intelligence",scope:"feature"},theme:"investigating",tags:{complexity:"medium"},panels:[{title:"Core Challenge",icon:"target",color:"purple",items:[{text:"Dashboard needs better session insight generation",icon:"alert-circle"},{text:"Balance guidance vs. over-prescription",icon:"brain"}]},{title:"Data Discovery",icon:"ph:magnifying-glass",color:"amber",items:[{text:"DB stores cached insights (outputs)",icon:"database"},{text:"But NOT conversation text (inputs)",icon:"ph:prohibit"},{text:"Found 16 recent cached insights for analysis",icon:"ph:check-circle"},{text:"Need alternative source for experiments",icon:"ph:arrows-split"}]}],milestones:[{label:"Review current insight prompt",status:"done"},{label:"Brainstorm improvements",status:"done"},{label:"Access historical data for testing",status:"current"},{label:"Run experimental iterations",status:"pending"},{label:"Deploy improved prompt",status:"pending"}],notable:[{type:"insight",description:"Identified LLM tendency toward over-prescription as key anti-pattern"},{type:"decision",description:"Shift from prescriptive to metacognitive guidance approach"},{type:"discovery",description:"DB contains insight outputs only—need conversation inputs for testing"}],recentActions:["Examined DB schema—insights table stores cached outputs","Retrieved 16 recent cached insights for pattern analysis","Discovered current session appears in own dataset (meta!)","Planning next approach: find conversation sources"]}},{frame:2,type:"patch",actionCount:25,messageIndex:44,percentComplete:10,trigger:"Shifted focus to extracting real input-output pairs from sessions. New phase: moving from analysis to concrete data extraction.",triggeringAction:"Bash",actionsSinceLastPatch:10,insights:{context:{project:"Orchestrator Dashboard",area:"Insight Generation System",mission:"Improving AI session monitoring dashboard intelligence",scope:"feature"},theme:"building",tags:{complexity:"medium"},panels:[{title:"Core Challenge",icon:"target",color:"purple",items:[{text:"Dashboard needs better session insight generation",icon:"alert-circle"},{text:"Avoid LLM attractor basin of over-specification",icon:"brain"}]},{title:"Data Extraction",icon:"ph:flow-arrow",color:"emerald",items:[{text:"Building script to reconstruct input→output pairs",icon:"ph:wrench"},{text:"Extracting conversation history from session DB",icon:"database"},{text:"Creating representative examples for prompt testing",icon:"ph:file-text"},{text:"Focusing on recent, diverse session types",icon:"ph:funnel"}]}],milestones:[{label:"Review current insight prompt",status:"done"},{label:"Brainstorm improvements",status:"done"},{label:"Access historical data for testing",status:"current"},{label:"Run experimental iterations",status:"pending"},{label:"Deploy improved prompt",status:"pending"}],notable:[{type:"decision",description:"Shift from prescriptive to metacognitive guidance approach"},{type:"discovery",description:"DB contains insight outputs only—need conversation inputs"},{type:"progress",description:"Building extraction script for input→output pairs"}],recentActions:["Queried session database for available data","Writing Python script to extract real examples","Selecting representative sessions (diverse, recent)","Reconstructing conversation history for test cases"]}},{frame:3,type:"patch",actionCount:34,messageIndex:61,percentComplete:13,trigger:"Shifted from code exploration to prompt engineering phase. User testing/iterating on prompts with real I/O examples.",triggeringAction:"text",actionsSinceLastPatch:9,insights:{context:{project:"Orchestrator Dashboard",area:"Insight Generation System",mission:"Improving AI session monitoring dashboard intelligence",scope:"feature"},theme:"experimenting",tags:{complexity:"medium"},panels:[{title:"Core Challenge",icon:"target",color:"purple",items:[{text:"Avoid LLM attractor basin of over-specification",icon:"alert-circle"}]},{title:"Testing Approach",icon:"ph:flask",color:"sky",items:[{text:"Extracted real conversation examples from session DB",icon:"ph:check-circle"},{text:"Building experimental harness for prompt iteration",icon:"ph:wrench"},{text:"Comparing outputs across multiple prompt versions",icon:"git-compare"},{text:"Focus on naturalness, insight quality, and utility",icon:"ph:star"}]}],milestones:[{label:"Review current insight prompt",status:"done"},{label:"Brainstorm improvements",status:"done"},{label:"Access historical data for testing",status:"done"},{label:"Run experimental iterations",status:"current"},{label:"Deploy improved prompt",status:"pending"}],notable:[{type:"discovery",description:"DB contains insight outputs only—need conversation inputs"},{type:"breakthrough",description:"Successfully extracted multiple real conversation examples"},{type:"action",description:"Setting up experimental harness for iterative prompt testing"}],recentActions:["Wrote script to extract conversation history","Retrieved multiple real input→output pairs","Reviewed extracted examples to understand insight quality","Preparing experimental testing harness"]}},{frame:4,type:"patch",actionCount:43,messageIndex:79,percentComplete:17,trigger:"Experimental validation phase: running comparative sessions to verify pattern consistency.",triggeringAction:"text",actionsSinceLastPatch:9,insights:{context:{project:"Orchestrator Dashboard",area:"Insight Generation System",mission:"Improving AI session monitoring dashboard intelligence",scope:"feature"},theme:"experimenting",tags:{complexity:"medium"},panels:[{title:"Testing Methodology",icon:"ph:flask",color:"sky",items:[{text:"Running multiple sessions through experimental harness",icon:"ph:play"},{text:"Comparing outputs across prompt versions for patterns",icon:"git-compare"},{text:"Assessing naturalness, insight quality, and utility",icon:"ph:chart-line"},{text:"Testing diverse conversation types for generalization",icon:"ph:squares-four"}]},{title:"Key Insights",icon:"lightbulb",color:"amber",items:[{text:"Avoid prescriptive constraints (LLM attractor basin)",icon:"alert-circle"},{text:"Pattern recognition > prescription listing",icon:"ph:lightbulb"}]}],milestones:[{label:"Access historical data for testing",status:"done"},{label:"Run experimental iterations",status:"current"},{label:"Compare old vs new systematically",status:"current"},{label:"Deploy improved prompt",status:"pending"}],notable:[{type:"breakthrough",description:"Successfully extracted real conversation examples"},{type:"finding",description:"Testing reveals patterns in how prompts affect insight generation"}],recentActions:["Ran experimental test with improved prompt approach","Initiated second session comparison to validate patterns","Analyzing outputs for naturalness and utility","Evaluating whether insights avoid over-prescription"]}},{frame:5,type:"patch",actionCount:50,messageIndex:91,percentComplete:19,trigger:"Completed analysis phase and created refined V4 prompt - moving to validation testing.",triggeringAction:"text",actionsSinceLastPatch:7,insights:{context:{project:"Orchestrator Dashboard",area:"Insight Generation System",mission:"Improving AI session monitoring dashboard intelligence",scope:"feature"},theme:"experimenting",tags:{complexity:"medium"},panels:[{title:"Evidence Gathered",icon:"ph:chart-line",color:"emerald",items:[{text:"Multiple test runs across diverse sessions",icon:"ph:check-circle"},{text:"V3 shows promise but inconsistent",icon:"ph:warning"},{text:"Pattern recognition > prescription listing",icon:"ph:lightbulb"}]},{title:"Next Steps",icon:"ph:arrow-right",color:"sky",items:[{text:"Created V4 with enhanced guidance",icon:"ph:pencil"},{text:"Stronger meta-awareness for struggling sessions",icon:"brain"}]}],milestones:[{label:"Run experimental iterations",status:"done"},{label:"Compare old vs new systematically",status:"current"},{label:"Synthesize learnings into V4",status:"current"},{label:"Validate & deploy to production",status:"pending"}],notable:[{type:"finding",description:"V3 better for healthy sessions, needs work for struggling ones"},{type:"insight",description:"Best insights identify behavioral patterns, not just activities"}],recentActions:["Executed test runs with multiple prompts","Analyzed outputs for patterns","Documented findings","Preparing V4 iteration"]}},{frame:6,type:"patch",actionCount:56,messageIndex:103,percentComplete:22,trigger:"Completed testing phase with all three benchmark versions running successfully. Ready for production evaluation.",triggeringAction:"Bash",actionsSinceLastPatch:6,insights:{context:{project:"Orchestrator Dashboard",area:"Insight Generation System",mission:"Improving AI session monitoring dashboard intelligence",scope:"feature"},theme:"polishing",tags:{complexity:"medium"},panels:[{title:"Validation Complete",icon:"ph:check-circle",color:"emerald",items:[{text:"9 tests (3 sessions × 3 prompts)",icon:"ph:check-circle"},{text:"V4 shows consistent improvement",icon:"ph:trend-up"},{text:"Strong on at-risk sessions",icon:"ph:shield-check"}]},{title:"Production Path",icon:"ph:rocket-launch",color:"purple",items:[{text:"Integrate V4 into insight service",icon:"ph:code"},{text:"Verify production behavior",icon:"ph:eye"},{text:"Document learnings",icon:"ph:notebook"}]}],milestones:[{label:"Compare old vs new systematically",status:"done"},{label:"Synthesize learnings into V4",status:"done"},{label:"Validate & deploy to production",status:"current"}],notable:[{type:"finding",description:"V3 better for healthy sessions, needs work for struggling"},{type:"insight",description:"Best insights identify behavioral patterns"},{type:"breakthrough",description:"V4 validated: consistent improvement in pattern recognition"},{type:"decision",description:"V4 ready for production integration"}],recentActions:["Updated comparison to test V4","Ran 9 total validation tests","Analyzed V4 results","Prepared for production integration"]}}]};function aO(e){switch(e){case"error":return a.jsx(We,{name:"alert-circle",size:14,className:"text-red-400"});case"fix":return a.jsx(We,{name:"check-circle",size:14,className:"text-emerald-400"});case"blocker":return a.jsx(We,{name:"ph:prohibit",size:14,className:"text-amber-400"});case"decision":return a.jsx(We,{name:"ph:signpost",size:14,className:"text-purple-400"});case"breakthrough":return a.jsx(We,{name:"ph:lightning",size:14,className:"text-yellow-400"});case"pivot":return a.jsx(We,{name:"ph:arrows-split",size:14,className:"text-sky-400"});case"finding":return a.jsx(We,{name:"ph:chart-line",size:14,className:"text-emerald-400"});case"insight":return a.jsx(We,{name:"ph:lightbulb",size:14,className:"text-amber-400"});case"discovery":return a.jsx(We,{name:"ph:magnifying-glass",size:14,className:"text-sky-400"});case"progress":return a.jsx(We,{name:"ph:arrow-right",size:14,className:"text-emerald-400"});case"success":return a.jsx(We,{name:"ph:check-circle",size:14,className:"text-emerald-400"});case"action":return a.jsx(We,{name:"ph:play",size:14,className:"text-sky-400"});default:return a.jsx(We,{name:"circle",size:14,className:"text-muted-foreground"})}}function lO(e){const t=e.toLowerCase();return t.includes("test")||t.includes("verif")||t.includes("validat")?a.jsx(We,{name:"ph:flask",size:14,className:"text-purple-400"}):t.includes("debug")||t.includes("fix")?a.jsx(We,{name:"bug",size:14,className:"text-amber-400"}):t.includes("built")||t.includes("creat")||t.includes("implement")||t.includes("wrote")?a.jsx(We,{name:"hammer",size:14,className:"text-sky-400"}):t.includes("analyz")||t.includes("search")||t.includes("discover")||t.includes("examin")?a.jsx(We,{name:"ph:magnifying-glass",size:14,className:"text-purple-400"}):t.includes("read")||t.includes("reviewed")?a.jsx(We,{name:"ph:book-open",size:14,className:"text-slate-400"}):t.includes("prepar")||t.includes("draft")||t.includes("planning")?a.jsx(We,{name:"ph:pencil",size:14,className:"text-amber-400"}):t.includes("ran")||t.includes("execut")?a.jsx(We,{name:"ph:play",size:14,className:"text-emerald-400"}):t.includes("retrieved")||t.includes("queried")?a.jsx(We,{name:"database",size:14,className:"text-sky-400"}):a.jsx(We,{name:"arrow-right",size:14,className:"text-accent"})}function cO({insights:e}){const{context:t,theme:n,tags:s,panels:o,milestones:l,notable:c,recentActions:f}=e;return a.jsx("div",{className:"border border-border/30 rounded-lg bg-card/20",children:a.jsxs("div",{className:"px-4 pt-4 pb-5",children:[t?.project&&a.jsxs("div",{className:"text-[11px] text-muted-foreground/50 uppercase tracking-wider mb-1",children:[t.project,t.area&&a.jsxs(a.Fragment,{children:[" › ",t.area]})]}),a.jsx("div",{className:"text-base text-foreground font-semibold line-clamp-2 leading-snug",children:t.mission}),a.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[t?.scope&&a.jsx("span",{className:`text-xs px-2 py-0.5 rounded font-medium ${t.scope==="major"?"bg-purple-500/20 text-purple-400":t.scope==="feature"?"bg-blue-500/20 text-blue-400":"bg-muted/30 text-muted-foreground/70"}`,children:t.scope}),n&&a.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground/70 font-medium",children:n.replace(/[🔬🧪]/g,"").trim()}),s?.complexity&&s.complexity!=="routine"&&a.jsx("span",{className:"text-xs px-2 py-0.5 rounded font-medium bg-amber-500/20 text-amber-400",children:s.complexity})]}),a.jsxs("div",{className:"mt-4 space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_1fr] gap-6",children:[l?.length>0&&a.jsxs("div",{className:"border border-border/30 rounded-lg p-5 bg-card/20",children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-4",children:"Progress"}),a.jsx("div",{className:"space-y-3",children:l.map((p,m)=>{const h=p.status.includes("done")||p.status.includes("complete")?"done":p.status.includes("current")||p.status.includes("in-progress")?"current":"pending";return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full text-xs ${h==="done"?"bg-green-500/20 text-green-400":h==="current"?"bg-accent/20 text-accent":"bg-muted/20 text-muted-foreground/40"}`,children:h==="done"?"✓":h==="current"?"→":"○"}),a.jsx("span",{className:`text-sm ${h==="done"?"text-muted-foreground/50":h==="current"?"text-foreground":"text-muted-foreground/40"}`,children:p.label})]},m)})})]}),a.jsxs("div",{className:"space-y-5",children:[f?.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-accent/60 mb-3",children:"Recent"}),a.jsx("div",{className:"space-y-2",children:f.slice(0,4).map((p,m)=>{const h=typeof p=="string"?p:p.text;return a.jsxs("div",{className:"flex items-start gap-2.5 text-sm text-foreground/60",children:[a.jsx("span",{className:"mt-1 flex-shrink-0",children:lO(h)}),a.jsx("span",{className:"line-clamp-1",children:h})]},m)})})]}),c?.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground/50 mb-3",children:"Notable"}),a.jsx("div",{className:"space-y-2.5",children:c.slice(0,3).map((p,m)=>a.jsxs("div",{className:"flex items-start gap-2.5 text-sm text-foreground/60",children:[a.jsx("span",{className:"mt-1 flex-shrink-0",children:aO(p.type)}),a.jsx("span",{className:"line-clamp-2",children:p.description||p.text})]},m))})]})]})]}),o?.length>0&&a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:o.map((p,m)=>{const h=hn(p.color);return a.jsxs("div",{className:`border ${h.border} rounded-lg p-4 ${h.bg}`,children:[a.jsxs("div",{className:`text-xs uppercase tracking-wider ${h.text} mb-3 flex items-center gap-2`,children:[p.icon&&a.jsx(We,{name:p.icon,size:14,className:h.icon}),p.title.replace(/[🎯🧠📊🗄️🧪]/g,"").trim()]}),a.jsx("div",{className:"space-y-1.5",children:p.items?.slice(0,5).map((g,y)=>{const b=typeof g=="object"&&g!==null,k=b?g.text:g,w=b?g.icon:void 0;return a.jsxs("div",{className:"text-sm text-foreground/70 flex items-start gap-2",children:[w?a.jsx(We,{name:w,size:12,className:"text-muted-foreground/60 shrink-0 mt-1"}):a.jsx("span",{className:"text-muted-foreground/40 shrink-0 mt-0.5",children:"•"}),a.jsx("span",{className:"line-clamp-2",children:k})]},y)})})]},m)})})]})]})})}function uO(){const[e,t]=d.useState(0),n=Qr.timeline,s=n[e],o=()=>t(Math.min(e+1,n.length-1)),l=()=>t(Math.max(e-1,0));return jn.useEffect(()=>{const c=f=>{(f.key==="ArrowRight"||f.key==="ArrowDown")&&o(),(f.key==="ArrowLeft"||f.key==="ArrowUp")&&l()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e]),a.jsx("div",{className:"h-screen bg-background p-8 overflow-y-auto",children:a.jsxs("div",{className:"max-w-4xl mx-auto",children:[a.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Patch Lifecycle Viewer"}),a.jsxs("p",{className:"text-muted-foreground mb-2",children:["Production-accurate simulation: Initial generation at ",Qr.initialGenerationThreshold," actions, quick check after EVERY action."]}),a.jsxs("p",{className:"text-sm text-muted-foreground/60 mb-6",children:[Qr.totalChecks," checks performed → ",Qr.skippedChecks," skipped → ",Qr.patchesGenerated," patches generated (",Qr.patchRate," patch rate)"]}),a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("button",{onClick:l,disabled:e===0,className:"flex items-center gap-2 px-4 py-2 rounded bg-muted/30 hover:bg-muted/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[a.jsx(AC,{size:18}),"Previous"]}),a.jsx("div",{className:"flex items-center gap-2",children:n.map((c,f)=>a.jsx("button",{onClick:()=>t(f),className:`w-3 h-3 rounded-full transition-all ${f===e?"bg-accent scale-125":f<e?"bg-emerald-500/50 hover:bg-emerald-500/70":"bg-muted/30 hover:bg-muted/50"}`,title:`Frame ${f}: ${c.type==="initial"?"Initial":`Patch #${c.frame}`}`},f))}),a.jsxs("button",{onClick:o,disabled:e===n.length-1,className:"flex items-center gap-2 px-4 py-2 rounded bg-muted/30 hover:bg-muted/50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:["Next",a.jsx(An,{size:18})]})]}),a.jsxs("div",{className:"mb-4 p-4 rounded-lg bg-card/40 border border-border/30",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:`text-xs px-2 py-1 rounded font-medium ${s.type==="initial"?"bg-purple-500/20 text-purple-400":"bg-emerald-500/20 text-emerald-400"}`,children:s.type==="initial"?"Initial Generation":`Patch #${s.frame}`}),a.jsxs("span",{className:"text-sm text-muted-foreground",children:["Frame ",e+1," of ",n.length]}),s.triggeringAction&&a.jsxs("span",{className:"text-xs px-2 py-0.5 rounded bg-muted/30 text-muted-foreground/70",children:["triggered by: ",s.triggeringAction]})]}),a.jsxs("div",{className:"text-sm text-muted-foreground",children:["Action ",s.actionCount," of ",Qr.totalActions," (",s.percentComplete,"%)"]})]}),a.jsxs("div",{className:"text-sm text-foreground/70",children:[a.jsx("span",{className:"text-muted-foreground font-medium",children:"Trigger: "}),s.trigger]}),s.type==="patch"&&a.jsxs("div",{className:"mt-2 text-xs text-muted-foreground/60",children:[s.actionsSinceLastPatch," actions since last update"]})]}),a.jsxs("div",{className:"mb-6",children:[a.jsxs("div",{className:"h-2 bg-muted/20 rounded-full overflow-hidden relative",children:[n.map((c,f)=>a.jsx("div",{className:`absolute top-0 bottom-0 w-0.5 ${f<=e?"bg-emerald-500":"bg-muted-foreground/20"}`,style:{left:`${c.percentComplete}%`}},f)),a.jsx("div",{className:"h-full bg-accent transition-all duration-300",style:{width:`${s.percentComplete}%`}})]}),a.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mt-1",children:[a.jsx("span",{children:"Session start"}),a.jsxs("span",{children:[Qr.totalActions," actions (",Qr.totalMessages," messages)"]})]})]}),a.jsx(cO,{insights:s.insights}),a.jsxs("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Use ← → arrow keys or click dots to navigate • ",n.length-e-1," frames remaining"]})]})})}const dO=d.createContext(void 0),Mx="claudia_session_id";function fO({children:e}){const[t,n]=d.useState("inactive"),[s,o]=d.useState(null),[l,c]=d.useState(null),[f,p]=d.useState([]),[m,h]=d.useState(!1),g=d.useRef(null),y=d.useCallback(E=>{if(E.type==="assistant"){const N=E.message?.content;if(!N)return;let M="";if(typeof N=="string"?M=N:Array.isArray(N)&&(M=N.filter(R=>typeof R=="object"&&R!==null&&R.type==="text"&&"text"in R).map(R=>R.text).join(`
|
|
137
|
+
`)),!M)return;const _=E.message?.id||`assistant-${Date.now()}`;g.current?.id===_?(g.current.content+=M,p(R=>{const P=R.findIndex(L=>L.id===_);if(P>=0){const L=[...R];return L[P]={...L[P],content:g.current.content,isStreaming:!0},L}return R})):(g.current={id:_,content:M},h(!1),p(R=>[...R,{id:_,role:"assistant",content:M,timestamp:new Date().toISOString(),isStreaming:!0}]))}else if(E.type==="result"){if(h(!1),g.current){const N=g.current.id;p(M=>M.map(_=>_.id===N?{..._,isStreaming:!1}:_)),g.current=null}}else E.type==="error"&&(console.error("Claudia stream error:",E.error),h(!1),g.current=null)},[]),{isConnected:b}=Z4(s,{onMessage:y,onConnect:()=>{console.log("Connected to Claudia stream")},onDisconnect:()=>{console.log("Disconnected from Claudia stream")},onError:E=>{console.error("Claudia stream error:",E)}}),k=d.useRef(!1),w=d.useCallback(async()=>{if(!(t==="loading"||t==="active"||k.current)){k.current=!0;try{n("loading");const E=await Ee.startClaudiaSession();o(E.streamingId),c(E.sessionId),n("active"),localStorage.setItem(Mx,E.sessionId),console.log("Claudia session started:",E)}catch(E){console.error("Failed to start Claudia session:",E),n("inactive")}finally{k.current=!1}}},[t]),S=d.useCallback(async E=>{s||await w();const N={id:`user-${Date.now()}`,role:"user",content:E,timestamp:new Date().toISOString()};p(M=>[...M,N]),h(!0);try{await Ee.sendClaudiaMessage(E)}catch(M){console.error("Failed to send message to Claudia:",M),h(!1)}},[s,w]),j=d.useCallback(async()=>{try{await Ee.stopClaudiaSession(),o(null),c(null),n("inactive"),p([]),h(!1),g.current=null,localStorage.removeItem(Mx)}catch(E){console.error("Failed to stop Claudia session:",E)}},[]);return d.useEffect(()=>{(async()=>{try{const N=await Ee.getClaudiaStatus();N.status==="active"&&N.streamingId&&(o(N.streamingId),c(N.sessionId),n("active"))}catch{console.log("No existing Claudia session found")}})()},[]),a.jsx(dO.Provider,{value:{status:t,streamingId:s,sessionId:l,messages:f,isConnected:b,isThinking:m,startSession:w,sendMessage:S,stopSession:j},children:e})}const pO=new BE({defaultOptions:{queries:{staleTime:3e4,gcTime:300*1e3,refetchOnWindowFocus:!0,retry:1}}});function mO(){return a.jsx(VE,{client:pO,children:a.jsx(HA,{children:a.jsx(pN,{children:a.jsx(lN,{children:a.jsx(fN,{children:a.jsx(fO,{children:a.jsxs(Zx,{children:[a.jsx(Yr,{path:"/",element:a.jsx(S1,{children:a.jsx(DF,{})})}),a.jsx(Yr,{path:"/c/:sessionId",element:a.jsx(S1,{children:a.jsx(qF,{})})}),a.jsx(Yr,{path:"/prototype/insights",element:a.jsx(YF,{})}),a.jsx(Yr,{path:"/prototype/evolution",element:a.jsx(tO,{})}),a.jsx(Yr,{path:"/prototype/v6",element:a.jsx(oO,{})}),a.jsx(Yr,{path:"/prototype/lifecycle",element:a.jsx(uO,{})})]})})})})})})})}function hO({onLogin:e}){const[t,n]=d.useState(""),[s,o]=d.useState(""),l=c=>{if(c.preventDefault(),t.length!==32||!/^[a-f0-9]+$/.test(t)){o("Invalid token");return}o(""),e(t),window.location.reload()};return a.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-white dark:bg-neutral-900 p-6",children:a.jsxs("div",{className:"w-full max-w-[400px] px-8 py-12 bg-white dark:bg-neutral-800 dark:shadow-[0_4px_12px_rgba(0,0,0,0.3)]",children:[a.jsx("h2",{className:"text-lg font-normal mb-4 text-neutral-900 dark:text-neutral-100 text-center tracking-tight",children:"Access token:"}),a.jsxs("form",{onSubmit:l,className:"flex flex-col gap-4",children:[a.jsxs("div",{className:"flex gap-2 items-center",children:[a.jsx(Mt,{type:"text",value:t,onChange:c=>n(c.target.value.toLowerCase()),className:"flex-1 h-11 px-4 rounded-3xl bg-neutral-50 dark:bg-neutral-700 border-neutral-200 dark:border-neutral-600 text-neutral-900 dark:text-neutral-100 font-mono text-sm transition-all focus:bg-white dark:focus:bg-neutral-900 focus:border-neutral-400 dark:focus:border-neutral-500",autoFocus:!0,spellCheck:!1,autoComplete:"off","aria-label":"Access token input"}),t&&a.jsx(Oe,{type:"submit",size:"icon",className:"w-11 h-11 rounded-full bg-neutral-900 dark:bg-neutral-100 text-white dark:text-neutral-900 hover:bg-neutral-800 dark:hover:bg-neutral-200 hover:-translate-y-px hover:shadow-[0_2px_8px_rgba(0,0,0,0.15)] active:translate-y-0 transition-all","aria-label":"Submit access token",children:a.jsx(b2,{size:16})})]}),s&&a.jsx("div",{className:"text-[13px] text-red-500 text-center -mt-2",children:s})]})]})})}function gO(){return _6(),Xi()?a.jsx(I6,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:a.jsxs(Zx,{children:[a.jsx(Yr,{path:"/*",element:a.jsx(mO,{})}),a.jsx(Yr,{path:"/inspector",element:a.jsx(yE,{})})]})}):a.jsx(hO,{onLogin:qx})}(()=>{try{const t=localStorage.getItem("claudia-theme"),n=t==="light"||t==="dark"||t==="system"?t:"system",s=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=n==="system"?s?"dark":"light":n;document.documentElement.setAttribute("data-theme",o),o==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}catch{}})();const W4=()=>{const t=getComputedStyle(document.documentElement).getPropertyValue("--color-bg-primary").trim(),n=document.getElementById("theme-color-meta");n&&t&&(n.content=t)},xO=new MutationObserver(e=>{e.forEach(t=>{t.type==="attributes"&&t.attributeName==="data-theme"&&setTimeout(W4,0)})});xO.observe(document.documentElement,{attributes:!0});document.addEventListener("DOMContentLoaded",W4);_8.createRoot(document.getElementById("root")).render(a.jsx(jn.StrictMode,{children:a.jsx(gO,{})}));"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(t=>t.unregister())});
|